Last active
August 29, 2015 14:03
-
-
Save nassimhaddad/c5eadfcc6fb774d77601 to your computer and use it in GitHub Desktop.
download dependent packages. useful to create a production environment, manage versions, and working on machines with no internet connections.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install https://github.com/andrie/miniCRAN | |
require(tools) | |
require(miniCRAN) | |
repositorylocation <- "/home/Downloads" | |
pks <- package_dependencies(c("data.table","ffbase"), db = available.packages(), | |
which = c("Depends","Imports","LinkingTo"), recursive=TRUE) | |
pks <- unique(c(do.call(c, pks), c("data.table","ffbase"))) | |
makeRepo(pkgs=pks, path=repositorylocation, type = "source", download = TRUE, writePACKAGES = TRUE) | |
install.packages(pkgs = "data.table", repos = repositorylocation, type = "source", | |
available=pkgAvail(repositorylocation)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment