Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R submit to CRAN: which R version to build package?

I want to submit a package to CRAN. In the CRAN repository policy it states that "Packages for which R CMD check gives an ‘ERROR’ when a new R x.y.0 version is released will be archived".

It also says "Please ensure that R CMD check --as-cran has been run on the tarball to be uploaded before submission".

Running R CMD check --as cran on my tarball gives me the warning:

Warning: unknown option ‘--as-cran’

I am running R version 2.14.1 on Ubuntu 12.04.2 LTS. Can I build a source package using this version or do I have to use R 3.0?

And why does R CMD check --as-cran not work for me?

like image 365
user1981275 Avatar asked Nov 20 '25 10:11

user1981275


2 Answers

The document you link to says:

Please ensure that R CMD check --as-cran has been run on the tarball to be uploaded before submission. This should be done with the current release of R or (preferably) R-devel or R-patched.

So, right now, you should use R-3.0.1 and also test against the R-devel branch (if possible).

like image 77
Andrie Avatar answered Nov 23 '25 04:11

Andrie


From the current October 2015 CRAN policy: "Please ensure that R CMD check --as-cran has been run on the tarball to be uploaded before submission. This should be done with the current version of R-devel (or if that is not possible and explained in the submission, current R-patched or the current release of R.)"

This, I believe is a change from the policy described in the original accepted answer.

docker/rocker is a way to achieve this fairly easily without mucking up your development environment.

I think it is correct to build with the latest release version, but test with R-devel and the latest release.

like image 31
Jack Wasey Avatar answered Nov 23 '25 04:11

Jack Wasey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!