Download all R packages at once from an online r-cran repository

Long story short:

 

library(miniCRAN)

repo <- “https://cran.rstudio.com”

pkgs <- available.packages()[,1]

pkgList <- pkgDep(pkgs, repos=repo, type=”source”, suggests=FALSE)in R:

makeRepo(pkgList, path=”D:/Rpackages”, repos=repo, type=c(“win.binary”))

will download every existing packages, as windows binary, to the folder “rpackages” on D:\ drive

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.