[Rd] R CMD check recursive copy of tests/

2007-08-29 Thread Henrik Bengtsson
>From NEWS of R v2.6.0 devel: o R CMD check now does a recursive copy on the 'tests' directory. However, R CMD check does not run *.R scripts in such subdirectories (as I thought/hoped for), only those directly under tests/, This may or may not be intentional. If true, maybe the above shou

Re: [Rd] R CMD check: Error in function (env) : could not find function "finalize"

2007-08-29 Thread Prof Brian Ripley
> To the best of my understanding, when R > CMD check runs examples, it will load *all* suggested packages, and > when done, detach them. When the garbage collector later runs and Not so. R CMD check just runs the examples in a normal session after loading the package being tested. Examples ma

Re: [Rd] Modifying R_CheckStack for a speed increase

2007-08-29 Thread Byron Ellis
Alternatively, if you actually wanted to keep the 0.95 you could use usage > R_CStackLimit - (R_CStackLimit >> 4) and probably get close enough to 0.95 as it makes no difference or go with 5 and get something more like 97%. At any rate, you'd avoid floating point. On 8/29/07, Stephen Milborrow <

[Rd] Modifying R_CheckStack for a speed increase

2007-08-29 Thread Stephen Milborrow
Greetings R developers, R will run a little faster when executing "pure R" code if the function R_CheckStack() is modified. With the modification, the following code for example runs 15% faster (compared to a virgin R-2.5.1 on my Windows XP machine): N = 1e7 foo <- function(x)

Re: [Rd] R CMD check: Error in function (env) : could not find function "finalize"

2007-08-29 Thread Henrik Bengtsson
Hi, thanks Seth and others (I've got some offline replies); all feedback has been useful indeed. The short story is that as the author of R.oo I am actually the bad guy here (but not for long since I'm soon committing a fix for R.oo). REPRODUCIBLE EXAMPLE #1: % R --vanilla > library(R.oo) R.oo v1

Re: [Rd] NA and NaN in function identical

2007-08-29 Thread Prof Brian Ripley
On Wed, 29 Aug 2007, Petr Savicky wrote: > The help page for function identical says: > 'identical' sees 'NaN' as different from 'as.double(NA)', but all > 'NaN's are equal (and all 'NA' of the same type are equal). > However, we have > x <- NaN > y <- as.double(NA) > x # [1] NaN > y #

[Rd] NA and NaN in function identical

2007-08-29 Thread Petr Savicky
The help page for function identical says: 'identical' sees 'NaN' as different from 'as.double(NA)', but all 'NaN's are equal (and all 'NA' of the same type are equal). However, we have x <- NaN y <- as.double(NA) x # [1] NaN y # [1] NA identical(x,y) # [1] TRUE In my opinion,

Re: [Rd] .Call and to reclaim the memory by allocVector

2007-08-29 Thread Yongchao Ge
Hi Seth, Thank you for the suggestion. Because of using .Call (which does not copy the value) for both parts of my program, there is no extra copy shown by tracemem(). Anyway, the information shown by gc() is very misleading as stated by Prof. Ripley, especially after creating and removing a c