Re: [Rd] Date vs date

2007-09-15 Thread Prof Brian Ripley
On Fri, 14 Sep 2007, hadley wickham wrote:

>>>   3. temp <- as.Date('1990/1/1') - as.date('1953/2/5')
>>>  sqrt(temp)
>>>  Error in Math.difftime(temp3) : sqrtnot defined for "difftime" objects
>>>
>>>   Minor bug: no space before the word 'not'
>>>   Major: this shouldn't fail.
>>>
>>>
>> Arguably, it should (Is this a difftime object? Which units?).
>> I'd advise against numeric operation on difftime objects in general,
>> because of the unspecified units. These are always "days" when working
>> with Date objects, but with general time objects it is not predictable.
>> So I'd recommend sqrt(as.numeric(temp, units="days")).

It fails by design.  Using sqrt() on a measurement that has an arbitrary 
origin would not have been good design.

> Why not just always use seconds for difftime objects?  An attribute
> could control how it was formatted, but would be independent of the
> underlying representation.

Because of leapseconds and changes to/from DST (which require knowing the 
timezone and its transition times).

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] (PR#9910) Incomplete library linking for grDevices.so on

2007-09-15 Thread ripley
What compiler system is this?  And what settings were used?

We are not seeing such a problem on Solaris 10 (neither Sparc nor x86_64) 
with the Sun Studio 11 compilers they shipped with (a month or two ago).

Note that the error message is not to do with subject line: it is 
launching R and /export/home/gordonp/Desktop/R-alpha/lib/libRlapack.so 
that has the problem.

I don't think that configure can be expected to know about all possible 
systems on which R might be built, which is why we allow users to set 
variables such as FLIBS and MAIN_LD.  We do try to document the settings 
needed for known systems in the R-admin manual, and that includes all the 
Solaris systems we have encountered or seen reports from.

On Fri, 14 Sep 2007, [EMAIL PROTECTED] wrote:

> Full_Name: Paul Gordon
> Version: 2.6.1 (alpha)
> OS: Solaris 10
> Submission from: (NULL) (136.159.169.6)
>
>
> When compiling R 2.6.1 (alpha 2007-09-13), grDevices.so fails to link 
> properly because of a missing symbol __vlog_.

That is not what the error message reproduced below says, which comes from 
the runtime loader.

>  This symbol is defined in 
> libmvec.so, but no -lmvec is add by the configure script.  Manually 
> adding -lmvec to the linking command allows grDevices to compile.  The 
> error output of the make command (for a 64-bit version of R) is given 
> below:
>
> cc -G -m64 -L/lib/64 -L/usr/lib/64 -L/usr/local/lib/64 -L/usr/ucblib/sparcv9
> -L/usr/ccs/lib/sparcv9 -L/opt/SUNWspro/prod/lib/sparcv9 -o grDevices.so 
> chull.o
> devNull.o devPicTeX.o devPS.o devQuartz.o init.o

> Warning in solve.default(rgb) :
>  unable to load shared library
> '/export/home/gordonp/Desktop/R-alpha/modules//lapack.so':
>  ld.so.1: R: fatal: relocation error: file
> /export/home/gordonp/Desktop/R-alpha/lib/libRlapack.so: symbol __vlog_:
> referenced symbol not found
> Error in solve.default(rgb) : lapack routines cannot be loaded
> Error: unable to load R code in package 'grDevices'
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Building an R GUI using gWidgets and RGtk2

2007-09-15 Thread Hans-Peter
>
> I'm developing a GUI in R that will be used to monitor financial
> portfolio performance.  The GUI will be distributed as an R package.  So
> far, I've decided to use the "cairoDevice", "RGtk2", "gWidgets", and
> "gWidgetsRGtk2" packages to develop the GUI.  I am trying to decide what
> would be the best way to structure the GUI would be.


Why not consider to build the GUI layer in some other (imho more suitable)
language and just call the R functionality from there? Depending on your
platform/requirements you could e.g. use Delphi, Python, or some webbased
interface (Morfik, php, ...).

Python would be my favorite (but I want to add that I didn't try this out
yet, it's only what I probably would check out (as an alternative to an
R-based interface)).

-- 
Regards,
Hans-Peter

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] R-2.6.0 for Windows, semi-transparent colours and layout()

2007-09-15 Thread Henric Nilsson (Public)
Hi,

The added support for semi-transparent colours in `windows' under 
R-2.6.0 for Windows is much appreciated.

However, I've discovered that issuing a `layout' (or `par' with 
arguments `mfcol'/`mfrow') call and then trying to plot several figures 
with semi-transparent colour on the same page results in only the first 
one being fully drawn. E.g.

 > x <- rnorm(1)
 > y <- rnorm(1)
 >
 > layout(matrix(1:2, ncol = 2))
 > plot(y ~ x, pch = 16, col = rgb(1, 0, 0, 0.15))
 > plot(y ~ x, pch = 16, col = rgb(1, 0, 0, 0.15))

results in the second one having only the axes and box, but no data 
points. This is under

 > sessionInfo()
R version 2.6.0 alpha (2007-09-14 r42843)
i386-pc-mingw32

locale:
LC_COLLATE=Swedish_Sweden.1252;LC_CTYPE=Swedish_Sweden.1252;LC_MONETARY=Swedish_Sweden.1252;LC_NUMERIC=C;LC_TIME=Swedish_Sweden.1252

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base


Henric

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Date vs date

2007-09-15 Thread Peter Dalgaard
Prof Brian Ripley wrote:
>>> Arguably, it should (Is this a difftime object? Which units?).
>>> I'd advise against numeric operation on difftime objects in general,
>>> because of the unspecified units. These are always "days" when working
>>> with Date objects, but with general time objects it is not predictable.
>>> So I'd recommend sqrt(as.numeric(temp, units="days")).
>>>   
>
> It fails by design.  Using sqrt() on a measurement that has an arbitrary 
> origin would not have been good design.
Er, _diff_time objects do have a well-defined origin at zero. Taking 
square roots (or exp, or...) of a number which  could be weeks as well 
as days is the real issue, I think.

-- 
   O__   Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark  Ph:  (+45) 35327918
~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] r cmd build

2007-09-15 Thread Gabor Grothendieck
On Windows Vista hhc.exe is not available.  One can do this on an
install:

rcmd install --docs=normal myPackage

to avoid the message about hhc.exe; however,
"rcmd build" does not appear to support --docs=normal so one cannot
do a build without getting a message about hhc.exe (although the build
still proceeds).

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel