Long story short:
in R, we need the miniCRAN package installed first (with its dependencies). First create the folder for the downloaded packages, then run the commands:
library(miniCRAN)
repo <- "https://cran.rstudio.com"
pkgs <- available.packages()[,1]
pkgList <- pkgDep(pkgs, repos=repo, type="source", suggests=FALSE)
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