Re: [Rd] Inferring dimensions on bitmap device from par()

2007-01-25 Thread Prof Brian Ripley
You asked > (or ultimately the dimension of the generated plot in pixels) without > know which of png(), jpeg() or bitmap() was used? That is determined by arguments 'width' and 'height' in the call to the device, and for the first two it is in pixels and for the third it is in inches. Interna

Re: [Rd] ?mean

2007-01-25 Thread Gabor Grothendieck
Good point. Perhaps what is needed is a Note clarifying all this in ?mean (unless the software itself is reworked as Martin has discussed). Regarding var(x), one could use sd(x)^2. On 1/25/07, Berwin A Turlach <[EMAIL PROTECTED]> wrote: > G'day Gabor, > > On Thu, 25 Jan 2007 09:53:49 -0500 > "Ga

[Rd] Rscript on Windows

2007-01-25 Thread Gabor Grothendieck
On UNIX one can use #! notation. It would be nice to be able to do something similar on Windows. This could be done by giving Rscript the capability of skipping over the first few lines. For example, there might be a --skip=n argument or perhaps Rscript would skip over any consecutive leading li

[Rd] Inferring dimensions on bitmap device from par()

2007-01-25 Thread Henrik Bengtsson
Hi, I am trying to infer the dimension of an opened bitmap (png, jpeg, bitmap device...) from par() parmeters. From the help on par(), I found that: > dim <- c(400, 200) > png("foo.png", width=dim[1], height=dim[2]) > dim2 <- par("din") * par("cra") / par("cin") > dev.off() > dim2 [1] 399. 1

[Rd] Rscript on Windows with R 2.5.0 dev

2007-01-25 Thread Gabor Grothendieck
On Windows XP with R version 2.5.0 Under development (unstable) (2007-01-22 r40548) I always get a message about grdevices when I run Rscript, e.g. C:\> rscript NUL During startup - Warning messages: 1: there is no package called 'grdevices' in: library(package, lib.loc = lib.loc , character.only

Re: [Rd] ?mean

2007-01-25 Thread Martin Maechler
> "Gabor" == Gabor Grothendieck <[EMAIL PROTECTED]> > on Thu, 25 Jan 2007 09:53:49 -0500 writes: Gabor> The help page for mean does not say what happens when one Gabor> applies mean to a matrix. Gabor> mean and sd work in an inconsistent way on a matrix Gabor> so that

[Rd] "rep" missing from methods:::.BasicFunsList

2007-01-25 Thread Stephen Pope
With: R version 2.4.1 Patched (2007-01-22 r40548) "rep" is missing from methods:::.BasicFunsList, causing methods:::genericForPrimitive("rep") to fail, which in turn causes setMethod("rep", ...) to fail. (setGeneric("rep") of course fails as it should, saying that rep is a primitive and metho

[Rd] Wish: C-API to print if R_Visible is TRUE (PR#9467)

2007-01-25 Thread thomas . friedrichsmeier
Full_Name: Thomas Friedrichsmeier Version: 2.4.1 OS: Linux Submission from: (NULL) (84.61.205.78) Frontends wishing to emulate an R console typically want to print the value of an evaluation, if and only if R_Visible is TRUE. R_Visible has never been part of the public API (at least not as far as

[Rd] Wish: C-API to get parse error messages (PR#9466)

2007-01-25 Thread thomas . friedrichsmeier
Full_Name: Thomas Friedrichsmeier Version: 2.4.1 OS: Linux Submission from: (NULL) (84.61.205.78) Currently, the C-API provides for parsing vectors (R_ParseVector()), but there does not seem to be a way to get at the detailed parse error message from C. Only a status code is returned, no error me

Re: [Rd] serialize() takes too long when serializing to a raw vector

2007-01-25 Thread Hin-Tak Leung
Ashish Kulkarni wrote: > Hin-Tak Leung wrote: >> It might be interesting to know get some details on your hardware. >> > > It's a P4 2.66GHz with a standard Intel motherboard having 1GB RAM. > That figures - I am on an opteron 2.2GHz on x86_64 linux with the same amount memory, and running R in

[Rd] ?mean

2007-01-25 Thread Gabor Grothendieck
The help page for mean does not say what happens when one applies mean to a matrix. mean and sd work in an inconsistent way on a matrix so that should at least be documented. Also there should be a See Also to colMeans since that provides the missing column-wise analog to sd. ___

Re: [Rd] serialize() takes too long when serializing to a raw vector

2007-01-25 Thread Duncan Murdoch
On 1/25/2007 6:32 AM, Ashish Kulkarni wrote: > Hello, > > R version 2.4.1 (2006-12-18) > i386-pc-mingw32 > > Calling serialize() with a NULL connection serializes it to a raw vector. > However, when the object to be serialized is large, it takes a very long time: > >> system.time( serialize(ma

Re: [Rd] serialize() takes too long when serializing to a raw vector

2007-01-25 Thread Luke Tierney
There was an error in the buffer allocation code that caused realloc to be called far more often than needed; on systems where realloc is slow this will cause problems. Will be fixed shortly in R-devel and R-patched. Best, luke On Thu, 25 Jan 2007, Ashish Kulkarni wrote: > Hin-Tak Leung wrote:

Re: [Rd] serialize() takes too long when serializing to a raw vector

2007-01-25 Thread Peter Dalgaard
Ashish Kulkarni wrote: > Hin-Tak Leung wrote: > >> It might be interesting to know get some details on your hardware. >> >> > > It's a P4 2.66GHz with a standard Intel motherboard having 1GB RAM. > > >> On my box, linux native seems to be a little slower than >> your quick.serialize time

Re: [Rd] obsolescence

2007-01-25 Thread Liaw, Andy
I think many would object to automatic check at every start-up. For the issue at hand, perhaps a check inside bug.report() would go a long way? Just an idea... Andy From: Barry Rowlingson > > Since many posts to R-devel/help invoke this response: > > Prof Brian Ripley wrote: > > Please, use t

Re: [Rd] serialize() takes too long when serializing to a raw vector

2007-01-25 Thread Ashish Kulkarni
Hin-Tak Leung wrote: > > It might be interesting to know get some details on your hardware. > It's a P4 2.66GHz with a standard Intel motherboard having 1GB RAM. > On my box, linux native seems to be a little slower than > your quick.serialize times: > > > system.time( serialize(matrix(0, 100

[Rd] I have won!

2007-01-25 Thread Vladimir Eremeev
Vladimir Eremeev wrote: > > That is, R correctly calls C wrapper, > ... > its arguments have correct values > That was not the case. I forgot as.integer() in the .C call and one of the arguments was 0 instead of 1. Since that, indices in the array were calculated incorrectly, and the program

Re: [Rd] serialize() takes too long when serializing to a raw vector

2007-01-25 Thread Hin-Tak Leung
Ashish Kulkarni wrote: > Hello, > > R version 2.4.1 (2006-12-18) > i386-pc-mingw32 > > Calling serialize() with a NULL connection serializes it to a raw vector. > However, when the object to be serialized is large, it takes a very long time: > >> system.time( serialize(matrix(0, 1000, 1000), N

[Rd] serialize() takes too long when serializing to a raw vector

2007-01-25 Thread Ashish Kulkarni
Hello, R version 2.4.1 (2006-12-18) i386-pc-mingw32 Calling serialize() with a NULL connection serializes it to a raw vector. However, when the object to be serialized is large, it takes a very long time: > system.time( serialize(matrix(0, 1000, 1000), NULL) ) [1] 38.25 40.73 81.54NANA

Re: [Rd] Error in loadNamespace(name) (PR#9464)

2007-01-25 Thread Peter Dalgaard
[EMAIL PROTECTED] wrote: > There is nothing here to reproduce. > It clearly depends on your .RData, which is not available to us. > Unless you can make it available, we cannot help. > Well, it's insufficient as a bug report, but the "no package called 'lattice'" bit suggests an installation issu