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

J C Nash pro|jcn@@h @end|ng |rom gm@||@com
Thu Jun 6 15:03:16 CEST 2019

After making a small fix to my optimx package, I ran my usual R CMD check --as-cran.

To my surprise, I got two ERRORs unrelated to the change. The errors popped up in
a routine designed to check the call to the user objective function. In particular,
one check is that the size of vectors is the same in expressions like (x - y)^2.
This works fine with R CMD check, but the --as-cran seems to have changed and it
pops an error, even when the call is inside try(). The irony that the routine in
question is intended to avoid problems like this is not lost on me.

I'm working on a small reproducible example, but it's not small enough yet.
In the meantime, I'm looking for the source codes of the scripts for "R CMD check" and
"R CMD check --as-cran" so I can work out why there is this difference, which seems
to be recent.

Can someone send/post a link? I plan to figure this out and provide feedback,
as I suspect it is going to affect others. However, it may be a few days or even
weeks if past experience is a guide.


More information about the R-package-devel mailing list