【发布时间】:2018-09-04 15:27:46
【问题描述】:
我今天将 R 3.4.4 更新为 R 3.5.0。而且我的包裹不能再通过R CMD check。它在checking whether package can be installed ... ERROR 失败。
另一方面,我的包可以工作,只要我不检查它,我就可以安装和使用它。
错误如下:
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
我尝试通过以下方式重新安装lattice:
sudo apt-get --reinstall install r-cran-lattice
或
remove.packages("lattice", lib="~/R/x86_64-pc-linux-gnu-library/3.5")
install.package("lattice")
包lattice 在这两种情况下都安装正确。但这并不能解决我的问题。此外,我确保有一个单一版本的 lattice 删除 r-cran 或自编译版本。没有任何效果。
编辑顺便说一句,我可以使用 library(sp) 或 library(lattice) 进行操作。但不是用 R CMD 检查
【问题讨论】: