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

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to