6
votes

I would like to submit a package (DLMtool) to the CRAN repository. When I check the package with R CMD check --as-cran I receive only 1 note regarding the new submission.

However when I submit the package I am receiving feedback from the R core team regarding errors that I do not receive. For example:

Quitting from lines 261-262 (DLMtool.Rnw)
Error: processing vignette 'DLMtool.Rnw' failed with diagnostics:
one node produced an error: NAs are not allowed in subscripted assignments 

I cannot recreate this error by running the code myself. But that isn't the point of this post: I'm not worried about specific errors, rather my inability to detect these myself. To this point Prof. Ripley has been very patient. I desperately don't want to waste any more of his time or any of the R core team by using them as a step-by-step checking process.

How can I recreate the CRAN package check process if --as-cran is insufficient?

A similar question has been asked regarding a previous version of R that was not answered satisfactorily as far as I can tell:

CRAN package check finds warning that R CMD check --as-cran doesn't

Cheers,

Tom

I'm using Windows 7 x64, RStudio 0.98.507 and R 3.1.1 x64.

1
CRAN checks with both the released and the development versions of R; you may only be using the release version. - Dirk Eddelbuettel
It's probably something that's changed in R-devel, so you'll need to run your tests using that. To do that on Windows, you'll need to build R from source. If you haven't done this before, it can be tedious. I've been collecting some notes on how to do it here, which you may find useful if you haven't done it before. An alternative is to run the package through something like Travis CI to save you from having to build R-devel on your own machine. - Thomas
devtools::build_win() is often helpful - hadley
Thanks Dirk, Thomas and Hadley. These are now on my list of submission steps. - Tom C
You could try a docker container like I described here: stackoverflow.com/a/33202985/2161065 - user2161065

1 Answers

6
votes

Submitting a package to CRAN still fills me a with a sense of uneasiness, despite having been successful on a number of occasions.

Some things to check:

  1. Ensure you are using the correct process

Specifically, use:

R CMD build pkg
R CMD check pkg_version.tar.gz
  1. Make sure you check using the current version of R, as well as the development branch, R-devel (http://cran.r-project.org/bin/windows/base/rdevel.html)

  2. Submit your package to the windows builder (http://win-builder.r-project.org/)

  3. Make sure you have read, and completely understood, every single sentence of the CRAN submission policy (http://cran.r-project.org/web/packages/policies.html)

  4. Submit your package using the online submission form (http://cran.r-project.org/submit.html)

Then hope for the best.

To be honest, every individual I have dealt with on the CRAN build team have been very patient and helpful.