Discrepancy between CRAN package check and R CMD check -as--cran
Asked Answered
B

1

8

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.

Bungle answered 11/9, 2014 at 19:52 Comment(5)
CRAN checks with both the released and the development versions of R; you may only be using the release version.Spireme
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.Yser
devtools::build_win() is often helpfulHoo
Thanks Dirk, Thomas and Hadley. These are now on my list of submission steps.Bungle
You could try a docker container like I described here: https://mcmap.net/q/1468228/-r-submit-to-cran-which-r-version-to-build-packageGantlet
P
9

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.

Photoflood answered 11/9, 2014 at 20:4 Comment(2)
Thanks Andrie for both editing my post and also providing a solid answer. I will follow your recommendation to check the package with both current and development versions of R.Bungle
However the problem I was having stemmed from the stochastic nature off the package. Prof Ripley found a legitimate error which I finally managed to recreate by doing sufficient replications. In order to make the vignette building stable for future iterations I've chosen to use set.seed() so that the user gets the same results as the vignette and strange errors do not raise there head at that stage (which could waste CRAN core team time).Bungle

© 2022 - 2024 — McMap. All rights reserved.