[Rd] tests conditioned on CRAN?

Spencer Graves spencer.graves at structuremonitoring.com
Mon Jul 1 07:28:06 CEST 2013


Hello:


       What is the recommended procedure for skipping long tests in "R 
CMD check --as-cran"?


       Some time ago, after a discussion on this list, I added the 
following function to the fda package:


CRAN <- function (x = "_R_CHECK_TIMINGS_") {
     x. <- Sys.getenv(x)
     nchar(as.character(x.)) > 0
}


       However, it does not seem to be working with R 3.0.1.  I know 
this, because the time to compute the examples in findFn.Rd in the sos 
package did not drop after I wrapped all the examples in the following:


if(!CRAN()){

...

}


       Thanks,
       Spencer



More information about the R-devel mailing list