package ‘vegan’ was installed by an R version with different internals

偶尔善良 提交于 2020-01-05 05:53:29

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!