I see this a lot with students who are able to install packages like
ggplot2 but then can't load it because a dependency "stringi" is
missing. Those students are generally using Windows, but today I
reproduced the same on RedHat Linux with R-3.2.2.
desiredPackages is a big vector of packages to install. This is using
a trick that one of R Core taught me about 15 years ago...
installedPackages <- rownames (installed.packages() )
alreadyHave <- desiredPackages %in% installedPackages
install.packages(desiredPackages[!alreadyHave],
install.packages("visNetwork",
+ dependencies = c("Depends"),
+ lib = TARGETLIB)
trying URL 'http://rweb.crmda.ku.edu/cran/src/contrib/visNetwork_0.1.2.tar.gz'
Content type 'application/x-gzip' length 1828012 bytes (1.7 MB)
==================================================
downloaded 1.7 MB
* installing *source* package 'visNetwork' ...
** package 'visNetwork' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (visNetwork)
The downloaded source packages are in
'/library/tmp/RtmpBImblN/downloaded_packages'
After that, I start over, the install of the desiredPackages vector
proceeds, but hits another snag:
install.packages(desiredPackages[!alreadyHave],
dependencies = c("Depends"),
+ + lib = TARGETLIB)
trying URL 'http://rweb.crmda.ku.edu/cran/src/contrib/DiagrammeR_0.8.1.tar.gz'
Content type 'application/x-gzip' length 3438156 bytes (3.3 MB)
==================================================
downloaded 3.3 MB
trying URL 'http://rweb.crmda.ku.edu/cran/src/contrib/sem_3.1-6.tar.gz'
Content type 'application/x-gzip' length 156194 bytes (152 KB)
==================================================
downloaded 152 KB
trying URL 'http://rweb.crmda.ku.edu/cran/src/contrib/OpenMx_2.3.1.tar.gz'
Content type 'application/x-gzip' length 2537264 bytes (2.4 MB)
==================================================
downloaded 2.4 MB
* installing *source* package 'DiagrammeR' ...
** package 'DiagrammeR' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (DiagrammeR)
ERROR: dependency 'StanHeaders' is not available for package 'OpenMx'
Go back, install just that one
install.packages("StanHeaders", dependencies = c("Depends"), lib = TARGETLIB)
trying URL 'http://rweb.crmda.ku.edu/cran/src/contrib/StanHeaders_2.8.0.tar.gz'
Content type 'application/x-gzip' length 479231 bytes (467 KB)
==================================================
downloaded 467 KB
* installing *source* package 'StanHeaders' ...
** package 'StanHeaders' successfully unpacked and MD5 sums checked
** inst
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (StanHeaders)
The downloaded source packages are in
'/library/tmp/RtmpBImblN/downloaded_packages'
I don't recall seeing this problem until the last few months.