简体   繁体   中英

How can I tell caret package to load its dependencies from a different location other than default?

I am using caret package in R and I was able to install using the command

install.packages("caret", lib="C:/My_Packages")

Now, when I do a library("caret") in my R script, it complains that it does not find the ggplot package. I had in fact installed ggplot2 using the above syntax.

It seems that the caret tries to load ggplot from the default location and does not search inside "C:/My_Packages".

Is there a way to mention that I want caret to load its dependencies from any other location except the default location?

Yes although this is not an issue with caret .

See the documentation on .libPaths

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM