I am trying to submit a new package to CRAN. After submitting, I got a response that it been rejected beacuse it did not pass the automated checks.
Specifically, the error message was as follows for the Windows build.
* checking package dependencies ... ERROR
Package required but not available: 'readr'
See the log for Windows here. It passed all checks for the Debian build fine (side note, I am fixing the NOTES relating to URL's).
The package passes all check on my local machine (Mac OS) as well as on travis-ci and using rhub/devtools to test on Windows. Specifically, I can run the following all without errors.
devtools::check()
devtools::check_win_develop()
rhub::check_for_cran()
Regarding readr which seems to be the cause of the issue, it is in the DESCRIPTION file as an Import and seems to be referenced correctly in the various functions. And again, all the above checks pass fine.
Is there some other way to test for CRAN that I'm missing here? I'm hesitant to resubmit without any changes but am not really sure what to change as I can't work out what is going wrong.
For reference, the package is on github.
Related
I created my own package with the RStudio build tools and building/loading the package via the build tools works fine. My functions run as desired and the documentation works fine as well.
Writing the package as a source file works fine, too, as well as installing the package from source. Though, when I execute functions after installing the package from source I get an "R code execution error" as well as the error message
Error in fetch(key) : cannot allocate memory block of size 2.7 Gb
The size of the memory block in the error message varies every time.
So the problem is that I can't run any functions after installing the package from source. I need to be able to share the package as a source file though.
Does anyone have experience with this kind of problem? Is it related to writing the package as a source file? I could not find anything so far.
Additional info: When I run the "check package" command, everything works fine except for one error checking the given examples. The examples should not be an issue though, right?
I am trying to run devtools::release to submit a R package I have written to CRAN and I get the following error message:
devtools::release()
Checking if synched with remote branch...
ERROR: Error in 'git2r_remote_fetch': unknown certificate check failure
I have been able to upload and download my package from GitHub without issues in the past, and the version of the package on my computer is up to date with the version on GitHub. The CMD checks on my computer throw up no issues. Can anyone advise what might be the issue?
This is most likely a security issue (see here; I'm guessing you're using Windows). I had a similar problem, and was being suddenly asked for passwords all the time. I was able to resolve it by downloading and installing the latest version of Git from here.
If you restart your R session, devtools should work properly with Github again.
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.
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!
I'm building R packages in R 3.0.1 on a Windows machine, using Rtools30 and the 'Build' tools associated with RStudio, which I assume is tied in with devtools (which is up-to-date). My typical process to build a package is:
Load All
Reoxygenize
Build & Reload
Check
Build Source Package
If everything goes without errors or warnings, I then:
install.packages("foo.tar.gz", repos=NULL, type="source")
Since upgrading to R 3.0.1, I now get this warning:
Warning in install.packages :
foo.tar.gz is not available (for R version 3.0.1)
I also tried before installing, and it did not get rid of the warning:
options(install.packages.check.source = FALSE)
Also, I notice this warning when I open the devtools library:
WARNING: Rtools 3.0 found on the path at c:/Rtools is not compatible with R 3.0.1.
Which is weird, Rtools 3.0 is suppose to be good from R >2.15.1 to R 3.0.x
Any ideas what is going on?
This is RStudio specific, as they wrap and/or changed a lot of functions from the utils for better integration. The problem lies with a call to getDependencies() to check for dependencies. But that function will also check whether the original package exists on CRAN and throws the given warning when it doesn't. A package you just built on your own computer is obviously not on CRAN, hence the warning.
In the source of the native install.packages(), getDependencies() isn't called in case you build from source or install from a different repository respectively. RStudio on the other hand calls getDependencies() before it passes everything on to the native install.packages() function.
This has to my knowledge no further effects, apart from confusing people. I didn't find a way to conveniently get rid of this in RStudio, as suppressWarnings() doesn't work in this context due to the complex way RStudio deals with this.
In a basic R console, you shouldn't have any problem.
So for the time being, I'd just ignore this and hope the RStudio team finds time to take care of this minor glitch.