Reputation: 1074
I am attempting to write a R package. As I run
devtools::check()
, one of the warnings messages is
Found the following significant warnings:
Warning: Installed Rcpp (0.12.12) different from Rcpp used to build dplyr (0.12.10).
I then
remove.packages("Rcpp")
and
install.packages("Rcpp", repo = "https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.4/Rcpp_0.12.10.tgz")
It gives me
Warning in install.packages :
cannot open URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.4/Rcpp_0.12.10.tgz/src/contrib/PACKAGES.rds': HTTP status was '404 Not Found'
What would be the best solution to this? Thank you very much!!
Upvotes: 2
Views: 63
Reputation: 16099
You should not worry too much about this error if you are still drafting this package (i.e. there's still some time to go before you actually use it), as it's possible there will be another change of version of these two packages. Obviously if you encounter any strange errors, or there are features from the most recent versions of either, you should fix it.
It's inadvisable to downgrade a package (i.e. change Rcpp
in your case); instead, you should upgrade both dplyr
and Rcpp
to a concurrent version. This can be best achieved by using the CRAN repository. In a fresh session,
remove.packages(c("dplyr", "Rcpp"))
## Restart
install.packages("dplyr") # Rcpp is a dependency
Note: to install a particular version, use devtools::install_version
:
devtools::install_version("Rcpp", version = "0.12.10")
The error you got was you directed install.packages
to look at the package file as if it were a package repository. This resulted in an HTTP 404 error, as there was no PACKAGES.rds
file relative to the phantom repository.
To install a package file directly, set repos=NULL
in install.packages
.
Upvotes: 2