问题
I have installed R-3.4.4 for Windows (32/64 bit) and RStudio 1.1.442 - Windows Vista/7/8/10. I installed package of vegan 2.4-6. When I try opening it then I get the message:
> install.packages("C:/Users/Na Talia/Rpackages/vegan_2.4-6.zip", repos = NULL, type = "win.binary")
Installing package into ‘C:/Users/Na Talia/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
package ‘vegan’ successfully unpacked and MD5 sums checked
> library("vegan", lib.loc="~/R/win-library/3.4")
Error: package ‘vegan’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
In addition: Warning message:
package ‘vegan’ was built under R version 3.5.0
Any help? Thank you for your time in advance.
P.S. I get the same message in R as well. I reinstalled vegan several times but nothing helps.
回答1:
Since you are accessing the package from lib.loc="~/R/win-library/3.4"
, you should be installing the package in that directory.
You can use the command as
install.packages("C:/Users/Na Talia/Rpackages/vegan_2.4-6.zip", repos = NULL, type = "win.binary", lib = "~/R/win-library/3.4")
Without specifying the lib path, R uses the first element of .libPaths().
来源:https://stackoverflow.com/questions/49527227/package-vegan-was-installed-by-an-r-version-with-different-internals