Reputation: 763
We use R at my university, where all computers run Windows XP or Windows 7 and read/write access to most places on the C drive is disabled. This includes the default directory for downloading and installing R packages, but does not include the Downloads folder, so I've been using this work-around:
install.packages("plyr",lib="C:/Users/g-rde434/Downloads/")
library(plyr,lib.loc="C:/Users/g-rde434/Downloads/")
where g-rde434
is the username and I'm just using plyr
as an example. For packages that require a lot of other packages in order to work, this gets messy because I've found that I have to manually install all the depends before I can install the package I actually want to use. For instances, packages like ggplot2
and sirt
each require a whole bunch of other packages to work properly. Is there a much easier way to do what I'm trying to do? I'm not asking about clever vectorizing tricks or anything like that, but rather some way to force the "higher-up" packages (e.g., ggplot2
or sirt
) to load all the other packages it needs from the library location I specified above?
Upvotes: 1
Views: 584
Reputation: 8041
Please try:
install.packages("plyr", lib="C:/Users/g-rde434/Downloads/", dependencies=TRUE)
For further reference see: How to tell CRAN to install package dependencies automatically?
Upvotes: 1