Message-ID: <6df4b704-06ea-75d6-0ac9-5a05644273e7@gmail.com>
Date: 2019-06-07T18:55:41Z
From: Duncan Murdoch
Subject: [R-pkg-devel] try() in R CMD check --as-cran
In-Reply-To: <CAF8bMcZ_bMxci-TMLCcBrgJu94jTPQc+bOCEiMXiZkBK46x5NQ@mail.gmail.com>
On 07/06/2019 1:53 p.m., William Dunlap wrote:
> I've attached a package, ppp_0.1.tar.gz, which probably will not get
> through to R-help, that illustrates this.
> It contains one function which, by default, triggers a
> condition-length>1 issue:
> ? ?f <- function(x = 1:3)
> ? ?{
> ? ? ? ?if (x > 1) {
> ? ? ? ? ? ?x <- -x
> ? ? ? ?}
> ? ? ? ?stop("this function always gives an error")
> ? ?}
> and the help file example is
> ? ?try(f())
>
> Then
> ? ?env _R_CHECK_LENGTH_1_CONDITION_=abort,verbose R-3.6.0 CMD check
> --as-cran ppp_0.1.tar.gz
> results in
> * checking examples ... ERROR
> Running examples in ?ppp-Ex.R? failed
> The error most likely occurred in:
Thanks, I see that now. I'm still not seeing it without the explicit
setting of the environment variable, i.e. --as-cran isn't setting it on
the versions I'm using (3.6.0 and R-devel).
Duncan Murdoch