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

From: Henrik Bengtsson <hb_at_biostat.ucsf.edu>
Date: Mon, 03 Sep 2012 00:49:35 -0700

Hi, see thread "[Rd] Proposal: Mechanism for controlling the amount of testing 'R CMD check' performs" on April 8, 2012:

  https://stat.ethz.ch/pipermail/r-devel/2012-April/063809.html

/Henrik

On Sun, Sep 2, 2012 at 10:43 PM, Spencer Graves <spencer.graves_at_prodsyse.com> wrote:
> 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.logical(x.)
> notCRAN <- is.na(xl) || xl
> #
> return(!notCRAN)
> }
>
>
> The companion help page included the following example:
>
>
> if(CRAN()){
> stop('CRAN')
> } else {
> stop('NOT CRAN')
> }
>
>
> This reported "NOT CRAN" even with "R CMD check --as-cran".
>
>
> Suggestions?
> Thanks,
> Spencer
>
>> sessionInfo()
> R version 2.15.1 (2012-06-22)
> Platform: i386-pc-mingw32/i386 (32-bit)
>
> locale:
> [1] LC_COLLATE=English_United States.1252
> [2] LC_CTYPE=English_United States.1252
> [3] LC_MONETARY=English_United States.1252
> [4] LC_NUMERIC=C
> [5] LC_TIME=English_United States.1252
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> other attached packages:
> [1] sos_1.3-5 brew_1.0-6
>
> loaded via a namespace (and not attached):
> [1] tools_2.15.1
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon 03 Sep 2012 - 07:52:48 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 03 Sep 2012 - 15:30:41 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive