download.packages(pkgs, destdir, available = NULL, repos = getOption("repos"), contriburl = contrib.url(repos, type), method, type = getOption("pkgType"), ...)
pkgs | a character vector to indicate the names of packages to download and install. These packages can be source or binary packages. |
destdir | a character vector to indicate where downloaded packages are stored. |
available | an object that is the result of "available.packages". If 'NULL', calls available.packages. |
repos | a character vector containing the base URL of the repositories. Can refer to local files. |
contriburl | the URL(s) of the contrib sections of the repositories. The contrib sections hold packages that are not part of the core. |
method | this argument is ignored. |
type | a character vector to indicate the type of package to download and install. Possible values are "source", "mac.binary", "mac.binary.leopard", "win.binary" and "win64.binary". |
... | additional arguments to pass to this funciton. |
## Not run: dir.create(tdir <- file.path(tempdir(), "packages")) download.packages("zoo", tdir) dir(tdir) unlink(tdir, recursive=TRUE) # delete temporary directory ## End(Not run)