Get different checking results from CRAN feedback - r

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.

Related

In continuation to previously asked "Unable to work with R-extension in NetLogo"

After changing all the needed environment varaibles ( Control Panel/ System/Advanced system settings/Environment Variables) in windows 8, when I am installing rJava Package I get errors as below
I tried in MsDOS immediately after changing environment variables,
first step >R "it was successful"
second >install.packages("rJava") "got error in this step"
then I tried >install.packages("rJava", repos="https://cran.rstudio.com/") "but again I did not succeeded"
I am tired of trying all this, I referred many links already but all in vain. Yes, I am using Proxy also. Please help any one.
1) It seems a download problem first. So do this:
Download rJava_0.9-8.zip from CRAN (cran.r-project.org/web/packages/rJava/index.html). Then, in Revolution R Enterprise; Packages - "Install Packages From local Zip Files..." - Choose rJava_0.9-8.zip - OK. If the problem is solved then OK.
If the problem persists, try the following Step.
2) Look at DESCRIPTION file in rJava (in library location):
Package: rJava
Version: 0.9-8
....
Depends: R (>= 2.5.0), methods
....
NeedsCompilation: yes
Your R version may be incompatible. Look at the warning: "rJava is not available for R3.3.0" in your screenshot. So do this:
Unzip file rJava_0.9-8.zip to R's working directory; the folder rJava is created there. Change R version accordingly (you may introduce lower version number in Depends section). Save the changed DESCRIPTION file. Apply classical procedure:
library(roxygen2) # install this package first if not done yet
library(devtools) # install this package first if not done yet
library(digest) # install this package first if not done yet
Note: Since rJava folder is created manually, no package.skeleton is needed at this stage.
roxygenize("rJava")
build("rJava")
install("rJava")
The above technique must solve the problem (It solved previously many R version problems!).
Analyze this one also:
Install a specific release of bioconductor package (where the solution I wrote solved the problem of the questioner).
If you still have problems, trigger the following:
sessionInfo(); getwd(); .libPaths()
and print the output in your question so that we can analyze if you have any machine-spesific or installation-spesific problems.

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.

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

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.

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?
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).
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.
You can try the new starfox/r-devel container available at https://hub.docker.com/r/starfox/r-devel/. It contains already some packages, which will make your release more convenient. There is also a guide how to use it.
Disclaimer: I am the maintainer of both, the container and the guide.

Resources