Re: [Rd] promptFunctions() to handle multiple names

2008-04-14 Thread Daniel Sabanés Bové
Hi John, thanks for the pointer to promptAll()! Judging by the description of your function, it seems to be exactly the thing I've searched for. Well, this is yet another reason to be looking forward to your new book. (When will it be in the stores?) Daniel John Chambers schrieb: > Daniel, >

Re: [Rd] option(expressions) and --max-ppsize

2008-04-14 Thread Prof Brian Ripley
On Mon, 14 Apr 2008, Tobias Verbeke wrote: Dear list, Is there an exact formula / safe rule of thumb that allows one to express the value of --max-ppsize as a function of the value of getOption("expressions") ? There is none: it entirely depends on what you are doing. But you would expect pp

[Rd] Small memory leak in plot on OS X (PR#11170)

2008-04-14 Thread abergeron
Full_Name: Arnaud Bergeron Version: 2.6.2 OS: Mac OS X 10.5.2 Submission from: (NULL) (69.157.224.197) When I run the following loop repeat { plot(seq(5), seq(5)) } the memory consumed by the process goes up by a small amout each time. I tried this with the quartz() and pdf() output devices. O

[Rd] NEWS file

2008-04-14 Thread David Scott
Is there Emacs support for creating a NEWS file for a package? If so where could I find it? I had a look at the GNU coding standards on documenting programs. It has a bit on Emacs and Change Logs but not concerning a NEWS file as far as I could see. David Scott ___

[Rd] Doing the right amount of copy for large data frames.

2008-04-14 Thread Gopi Goswami
Dear All, Thanks a lot for your helpful comments (e.g., NAMED, ExpressionSet, DNAStringSet). Observations and questions :: ooo For a data.frame dd and a list ll with same contents to being with, the following operations show significant difference in the maximum memory usage column of the gc

Re: [Rd] && and ||

2008-04-14 Thread Yuan Jian
Berwin A Turlach <[EMAIL PROTECTED]> wrote: G'day Yu, On Sun, 13 Apr 2008 23:48:33 -0700 (PDT) Yuan Jian wrote: > what should I do when I want to get a sequence for operate && or ||? Read `help("&&")' and then use & and |. :) HTH. Cheers, Berwin === Full address =

Re: [Rd] clean-up actions after non-local exits

2008-04-14 Thread Luke Tierney
On Mon, 14 Apr 2008, Vadim Organovich wrote: > This is good, thanks! > > I'd like to be able to make sure that the resource is released in conrolled > fasion rather than at some arbitrary gc() call time. Will the following trick > achieve the goal: > > foo <-function(whatever) { > on.exit(gc())

Re: [Rd] HOW TO AVOID LOOPS

2008-04-14 Thread Bill Dunlap
On Mon, 14 Apr 2008, Stephen Milborrow wrote: > > Le sam. 12 avr. ? 12:47, carlos martinez a ?crit : > > Looking for a simple, effective a minimum execution time solution. > > > > For a vector as: > > > > c(0,0,1,0,1,1,1,0,0,1,1,0,1,0,1,1,1,1,1,1) > > > > To transform it to the following vector wi

Re: [Rd] clean-up actions after non-local exits

2008-04-14 Thread Duncan Murdoch
On 14/04/2008 5:10 PM, Vadim Organovich wrote: > This is good, thanks! > > I'd like to be able to make sure that the resource is released in conrolled > fasion rather than at some arbitrary gc() call time. Will the following trick > achieve the goal: > > foo <-function(whatever) { > on.exit(gc

Re: [Rd] HOW TO AVOID LOOPS

2008-04-14 Thread Simon Urbanek
On Apr 14, 2008, at 4:22 PM, Stephen Milborrow wrote: >> Le sam. 12 avr. à 12:47, carlos martinez a écrit : >> Looking for a simple, effective a minimum execution time solution. >> >> For a vector as: >> >> c(0,0,1,0,1,1,1,0,0,1,1,0,1,0,1,1,1,1,1,1) >> >> To transform it to the following vector w

Re: [Rd] clean-up actions after non-local exits

2008-04-14 Thread Vadim Organovich
This is good, thanks! I'd like to be able to make sure that the resource is released in conrolled fasion rather than at some arbitrary gc() call time. Will the following trick achieve the goal: foo <-function(whatever) { on.exit(gc()) ## arrange for an external pointer, don't know how yet ..

Re: [Rd] promptFunctions() to handle multiple names

2008-04-14 Thread John Chambers
Daniel Sabanés Bové wrote: > Hi John, > > thanks for the pointer to promptAll()! Judging by the description > of your function, it seems to be exactly the thing I've searched for. > > Well, this is yet another reason to be looking forward to your new book. > (When will it be in the stores?) Accordi

Re: [Rd] clean-up actions after non-local exits

2008-04-14 Thread Duncan Murdoch
On 14/04/2008 4:33 PM, Vadim Organovich wrote: > Dear R-devel, > > > > Some time ago I started a thread that boiled down to clean-up actions after > non-local exits in R, see below. I wonder if there has been any progress on > this? R-ext 2.6.1 doesn't say much on the subject. > > > > How,

[Rd] clean-up actions after non-local exits

2008-04-14 Thread Vadim Organovich
Dear R-devel, Some time ago I started a thread that boiled down to clean-up actions after non-local exits in R, see below. I wonder if there has been any progress on this? R-ext 2.6.1 doesn't say much on the subject. How, for example, do people deal with a situation where their C (C++) func

Re: [Rd] HOW TO AVOID LOOPS

2008-04-14 Thread Stephen Milborrow
Le sam. 12 avr. à 12:47, carlos martinez a écrit : Looking for a simple, effective a minimum execution time solution. For a vector as: c(0,0,1,0,1,1,1,0,0,1,1,0,1,0,1,1,1,1,1,1) To transform it to the following vector without using any loops: (0,0,1,0,1,2,3,0,0,1,2,0,1,0,1,2,3,4,5,6) Here is

[Rd] option(expressions) and --max-ppsize

2008-04-14 Thread Tobias Verbeke
Dear list, Is there an exact formula / safe rule of thumb that allows one to express the value of --max-ppsize as a function of the value of getOption("expressions") ? ?options tells "If you increase it [the expressions option], you may also want to start R with a larger protection stack". Motiv

[Rd] unix.time() scoping problem (PR#11169)

2008-04-14 Thread bill
Full_Name: Bill Dunlap Version: 2.8.0 Under development (unstable) svn 45325 OS: Linux Submission from: (NULL) (76.28.245.14) It is difficult to write wrapper functions for unix.time(expr) because it uses the idiom expr <- substitute(expr) eval(expr, envir=sys.parent()) to evaluate the in

[Rd] NAs and Infinitely Large POSIXct Objects

2008-04-14 Thread McGehee, Robert
Hello, I got bungled up by the fact that an infinite POSIXct object is represented by NA, but is not, in fact, NA. While an infinitely large POSIXct object seems strange, perhaps R should use the convention of representing it as Inf rather than NA to avoid any confusion. Cheers, Robert > x <- as.

Re: [Rd] promptFunctions() to handle multiple names

2008-04-14 Thread John Chambers
Daniel, Check out the promptAll() function in the SoDA package on CRAN. (Because it was written as an example for my new book, it's not the fanciest imaginable, but seems to work OK.) John Daniel Sabanés Bové wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > Hi all, > > I wanted

Re: [Rd] Doing the right amount of copy for large data frames.

2008-04-14 Thread Martin Morgan
Hi Gopi "Gopi Goswami" <[EMAIL PROTECTED]> writes: > Hi there, > > > Problem :: > When one tries to change one or some of the columns of a data.frame, R makes > a copy of the whole data.frame using the '*tmp*' mechanism (this does not > happen for components of a list, tracemem( ) on R-2.6.2 says

Re: [Rd] HOW TO AVOID LOOPS

2008-04-14 Thread Greg Snow
I would be interested to see how the following approach compares to the other suggestions: > x <- c(0,0,1,0,1,1,1,0,0,1,1,0,1,0,1,1,1,1,1,1) > test <- c(0,0,1,0,1,2,3,0,0,1,2,0,1,0,1,2,3,4,5,6) > out <- Reduce( function(x,y) x*y + y, x, accumulate=TRUE ) > all.equal(out,test) [1] TRUE For the se

Re: [Rd] Doing the right amount of copy for large data frames.

2008-04-14 Thread Tony Plate
Gopi Goswami wrote: > Hi there, > > > Problem :: > When one tries to change one or some of the columns of a data.frame, R makes > a copy of the whole data.frame using the '*tmp*' mechanism (this does not > happen for components of a list, tracemem( ) on R-2.6.2 says so). > > > Suggested solution ::

Re: [Rd] Doing the right amount of copy for large data frames.

2008-04-14 Thread Peter Dalgaard
Gopi Goswami wrote: > Hi there, > > > Problem :: > When one tries to change one or some of the columns of a data.frame, R makes > a copy of the whole data.frame using the '*tmp*' mechanism (this does not > happen for components of a list, tracemem( ) on R-2.6.2 says so). > > > Suggested solution ::

[Rd] Doing the right amount of copy for large data frames.

2008-04-14 Thread Gopi Goswami
Hi there, Problem :: When one tries to change one or some of the columns of a data.frame, R makes a copy of the whole data.frame using the '*tmp*' mechanism (this does not happen for components of a list, tracemem( ) on R-2.6.2 says so). Suggested solution :: Store the columns of the data.frame

Re: [Rd] Bug in ci.plot(HH Package) (PR#11163)

2008-04-14 Thread ligges
Please report bugs in contributes packages to the package maintainer (CCing), not to R-bugs. Best, Uwe Ligges [EMAIL PROTECTED] wrote: > Full_Name: Yasuhiro Nakajima > Version: 2.6.1 > OS: WinXP SP2 > Submission from: (NULL) (202.237.255.13) > > > Dear all, > > I noticed the following behavi

Re: [Rd] && and ||

2008-04-14 Thread Simon Blomberg
Use the vector versions: & and | Cheers, Simon. On Sun, 2008-04-13 at 23:48 -0700, Yuan Jian wrote: > Hello there, > > I got a small problem about logical calculation: > we can get a sequene from a+b as below: > > > a<-c(1,2) > > b<-c(3,4) > > a+b > [1] 4 6 > > but when the s

Re: [Rd] (PR#11161) Incorrect @INC: Rcmd SHLIB error under Windows

2008-04-14 Thread ripley
The bug is yours: you are using Cygwin Perl, not a Windows Perl. This is specifically warned about in the manual: @strong{Beware}: you do need a @emph{Windows} port and not the Cygwin one. Users of 64-bit Windows can use a Win64 Perl (such as that from ActiveState) if they prefer. You

Re: [Rd] Incorrect @INC: Rcmd SHLIB error under Windows (2.6.2, 44383) (PR#11161)

2008-04-14 Thread Mathieu Ribatet
Has your environment variable path been set correctly? It's been a while that I'm not using R under windows but remember had experienced the same error. I remember that I had to put many paths as environment variable to build R packages properly. Best, Mathieu [EMAIL PROTECTED] a écrit : > Hi

Re: [Rd] && and |

2008-04-14 Thread Jared O'Connell
Use just "&" or "|", these perform element wise, > c(1,2) && c(0,1) [1] FALSE > c(1,2) & c(0,1) [1] FALSE TRUE [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Incorrect @INC: Rcmd SHLIB error under Windows (2.6.2, 44383) (PR#11165)

2008-04-14 Thread mathieu . ribatet
Has your environment variable path been set correctly? It's been a while that I'm not using R under windows but remember had experienced the same error. I remember that I had to put many paths as environment variable to build R packages properly. Best, Mathieu [EMAIL PROTECTED] a écrit : > Hi

Re: [Rd] && and ||

2008-04-14 Thread Mathieu Ribatet
Well, you just have to use "&", "|" instead of "&&", "||". Best, Mathieu Yuan Jian a écrit : > Hello there, > > I got a small problem about logical calculation: > we can get a sequene from a+b as below: > > > a<-c(1,2) > >> b<-c(3,4) >> a+b >> > [1] 4 6 > > but when th