I updated R 3.4.4 to R 3.5.0 today. And my package cannot pass R CMD check
anymore. It fails at checking whether package can be installed ... ERROR
.
In another hand my package works, I can install it and use it as long as I don't check it.
The error is the following:
Error: package or namespace load failed for ‘sp’:
package ‘lattice’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
Error : package ‘sp’ could not be loaded
I tried to reinstall lattice
these ways:
sudo apt-get --reinstall install r-cran-lattice
or
remove.packages("lattice", lib="~/R/x86_64-pc-linux-gnu-library/3.5")
install.package("lattice")
The package lattice
is installed correctly in both cases. But it does not solve my problem. Also I ensured to have a single version of lattice
removing either the r-cran
one or the self compiled version. Nothing works.
Edit By the way I can do library(sp)
or library(lattice)
it works. But not with R CMD check
The error message tells you that the binary you are attempting to install comes from an insufficient / incompatible R version.
Two fixes:
Install from source as you did. After that check with AP <- available.packages()
that you really only have one.
Use the correct binarie: read this README at CRAN and switch to Michael's 'R 3.5' repos. Many of us have been doing that for weeks.
Lastly, the r-sig-debian
list is a friendly place for these questions and more. Subscribe first so that you can post.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With