[Rd] if(--as-cran)?

2012-09-02 Thread Spencer Graves
Hello, All: The fda package has tests that run too long for CRAN's current rules. I'd like to wrap some examples in a construct like the following: if(!CRAN()){ ... } I tried the following: CRAN <- function(x='_R_CHECK_CRAN_INCOMING_'){ x. <- Sys.getenv(x) xl <- as.l

Re: [Rd] Possible page inefficiency in do_matrix in array.c

2012-09-02 Thread Simon Urbanek
Actually, my apologies, I was assuming that your example was based on the SO question while it is not at all (the code is not involved in that test case). Reversing the order does indeed cause a delay. Switching to a single index doesn't seem to have any impact. R-devel has the faster version no

Re: [Rd] Possible page inefficiency in do_matrix in array.c

2012-09-02 Thread Simon Urbanek
On Sep 2, 2012, at 10:04 PM, Matthew Dowle wrote: > > In do_matrix in src/array.c there is a type switch containing : > > case LGLSXP : >for (i = 0; i < nr; i++) >for (j = 0; j < nc; j++) >LOGICAL(ans)[i + j * NR] = NA_LOGICAL; > > That seems page inefficient, iiuc. Think it sho

[Rd] Possible page inefficiency in do_matrix in array.c

2012-09-02 Thread Matthew Dowle
In do_matrix in src/array.c there is a type switch containing : case LGLSXP : for (i = 0; i < nr; i++) for (j = 0; j < nc; j++) LOGICAL(ans)[i + j * NR] = NA_LOGICAL; That seems page inefficient, iiuc. Think it should be : case LGLSXP : for (j = 0; j < nc; j++) for (i =