Skip to content
Prev 4038 / 12125 Next

[R-pkg-devel] try() in R CMD check --as-cran

The failure stated in the R CMD check failure report is:
This comes from --as-cran performing useful extra checks via setting the
environment variable _R_CHECK_LENGTH_1_LOGIC2_, which means:
(see https://cran.r-project.org/doc/manuals/r-release/R-ints.html#Tools)

The failure report also states the source of the failure:
The problem is that both is.infinite(fval) and is.na(fval) return
vectors of length 10 in your test case:
The || operator works on length 1 Booleans. Since fval can be of length
greater than 1 at that point, the proper condition seems to be:

any(is.infinite(fval)) || any(is.na(fval))

Best regards,

	Sebastian


Am 07.06.19 um 14:53 schrieb J C Nash: