Discrepancy between CRAN package check and R CMD check -as--cran - r

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.

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:
Ensure you are using the correct process
Specifically, use:
R CMD build pkg
R CMD check pkg_version.tar.gz
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)
Submit your package to the windows builder (http://win-builder.r-project.org/)
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)
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.

Related

CRAN submission frequency and debugging

How often should one update a package on CRAN? I noticed NOTEs in the CRAN checks that I have since solved.
However, I just discovered that the("my"(disclosure)) package now fails to install on one of the Linux flavors. How can I best know what is causing the error as the logs simply show:
installing to library ‘/home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages’
Error: ERROR: no permission to install to directory ‘/home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages’
Secondly, if I fix this problem, how long should I wait before submitting to CRAN? I was ideally thinking of taking a month or so as I read somewhere.
Thanks in advance.
CRAN checks for reference.
EDIT:: I discovered that there are some issues with dplyr as per its CRAN checks, could this be causing the problem?!
One of the most used guidelines for releasing R packages on CRAN says
Do not submit updates too frequently. The policy suggests a new
version once every 1-2 months at most.

CRAN check rgdal not available for checking

I have an R package that I successfully submitted to CRAN over a year ago. I am ready to submit an update, however I see in the package check results an error: Package suggested but not available for checking: ‘rgdal’
This R package passes checks with R CMD check --as-cran on macOS, winbuilder with R-devel and on ubuntu. But I don't understand why rgdal was not available for checking in that one instance, and I am trying to avoid this same error cropping up again.
A quick google search shows this same error showing up for quite a few R packages, always only for r-release-osx-x86_64.
Is this something I should be concerned with?
In the end, I was able to ignore this issue, and this was not a problem. The same error did not crop up with the submission of the package update.

Get different checking results from CRAN feedback

I am trying to publish my R package. I ran 'check' from R studio and got a clean OK (without Notes or Errors).
After submitting it, I got feedback from CRAN saying that I have NOTES about "no visible global function definition for ‘quantile’"
I re-checked my package on R studio and got a clean OK again. I didn't see this note on my end. Does anyone know why we get different checking results?
Maybe the best place to catch these things today (if your problem is not OS specific) is with win-builder as some people have said in the comments.
The devtools package has a really convenient function to send your package to win-builder, just run build_win() when inside your Rstudio project for the package. It will compile the package and then upload it to win-builder, which will run tests both on the R-release and R-devel and thensend you the link for the results on the email specified on the description file.
This behavior has been part of R-devel since late June this year (see here for details). As it says in the CRAN Repository 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.)
So, you need to run R CMD check --as-cran on your package, using R-devel.

CRAN Package submission - R CMD Checks

I was building a package that I wanted to submit to CRAN. I completed R CMD checks (using devtools::check()) and ensured that I fix all errors, warnings and notes before I build my package (devtools::build) and then submit the resulting tar.gz file to CRAN.
However, apparently, the package failed the R CMD checks at CRAN (There was one note and one error, as per their mail).
Now my question was, why wasn't this picked up when I ran the checks at my end?
To provide some specifics - One of the notes was regarding the usage of a few functions from stats package. I hadn't specifically imported these functions in my namespace.
While this seems to be an easy enough fix, it's mildly irritating (I would have ideally expected to find this while I was running my checks)
How can I avoid such situations in the future?
Thanks!

CRAN finds an warning that R CMD check --as-cran does not

I am using 32-bit R 3.1.2 on Windows 7.
I recently conducted an R CMD check --as-cran on a recently-developed package and received only the 'New submission' note. Research here and on R-devel suggested this could be ignored. I also used devtools::build_win() and received no notes or warnings, other than the one mentioned previously. Further, I built the package locally with R CMD build and R CMD INSTALL --build and everything worked as it should, including the PDF manual.
Upon submission to CRAN, I was told that a warning was thrown:
This fails to make its manual:
* checking PDF version of manual ... WARNING
LaTeX errors when creating PDF version.
This typically indicates Rd problems.
LaTeX errors found:
! Missing $ inserted.
<inserted text>
$
l.682 }{}
! Missing } inserted.
<inserted text>
}
l.682 }{}
...
The line appears to be
\widehat{R_1} = \frac{\sum\limits_{i=1}^n{c_i/n}}{\sum\limits_{i=1}^n{L_i/n}}
Additional research here suggests that I use win-builder.r-project.org/ to check my package on the development version and results from that test threw only the "New submission" warning.
I'm at loss. I can't replicate the error that CRAN found an everything appears to work correctly on my machine and on win-builder.r-project.org, too.
Can someone please help me with resolving this issue? I freely admit that I am not a LaTeX expert but given that the line wasn't an issue with R 3.1.2 on windows or the development version on win-build, I don't know where to begin.
Package information is available here:
creelSurvey
I used the inlinedocs package to write my functions and comments. The warning is coming from the .R, line 127:
this function
and the .Rd line 39:
this .Rd
Thanks for your help.
I was able to reproduce this problem on Ubuntu 12.04 with r-devel by cloning the Github repo and running
R CMD build creelSurvey
R CMD check --as-cran BusRouteCreelSurvey_0.2.1.tar.gz
I was able to fix it by removing DOS end-of-line markers (^M or Ctrl-M) from man/SimulateBusRoute.Rd. I don't know the easiest way to do this on Windows (you could look for a dos2unix utility, or possibly come up with a readLines solution.
I don't know how it will work across platforms, but this seems to work for me:
fn <- "MakeAnglers.Rd"
r <- readLines(fn)
writeLines(r[nchar(r)>0],con="new.Rd")
I would (1) look for (possibly obscure) warnings in the R Extensions manual about end-of-line markers and then (2) report this, either to the CRAN maintainers or by posting on r-devel#r-project.org.
In general you should be able to detect these problems if you can set up a test build on a Linux system; I don't know of an equivalent of win-builder.r-project.org for Linux systems, but http://travis-ci.org is a good resource, and this Github project is a good way to get started with R projects on Travis. (Or you can set your project up on R-forge.) I recognize that this might be more of a project than you're looking for right now, just including it for future reference.

Resources