I was trying to use vif()
function from the car
package of R.
When I first executed vif(X)
, an error message popped up as:
Error in vif(mod1) : could not find function "vif"
I tried library(car)
and get a following error as:
Error: package or namespace load failed for ‘car’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘stringi’
I read and tried the following references until I solved the problem:
$ wget https://github.com/Rexamine/stringi/archive/master.zip
$ unzip master.zip
$ R CMD INSTALL stringi-master --preclean
R$ install.packages('stringi')
You will be asked:
There is a binary version available but the source version is later:
binary source needs_compilation
stringi 1.4.5 1.4.6 TRUE
Do you want to install from sources the package which needs compilation? (Yes/no/cancel)
Please answer no to install from binary.
Now try:
R$ library(car)
R$ ?vif
And everything works fine.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.