download_dep: To download all the required packages to a specified local...

Description Usage Arguments Value Author(s) Examples

View source: R/download_dep.R

Description

This function aims to download all the required packages to a specified local directory.

Usage

1
2
3
4
5
download_dep(
  x,
  destination_dir = "./",
  server_link = "http://cran.rstudio.com/"
)

Arguments

x

A vector of the package names to be downloaded.

destination_dir

Destination directory for the packages to be downloaded. The default is the current working directory.

server_link

The link of the server to download the packages from. The default is the official CRAN website (http://cran.rstudio.com/).

Value

.tar.gz: All the R packages to be downloaded with the format of .tar.gz

Author(s)

Miao Cai <email: miao.cai@outlook.com>

Examples

1
2
3
4
5
6
7
8
# download the dependencies, and all the dependencies of the dependencies, and so on of the package "cli".
package_vec = pkg_dep_all('cli')
# Depth: 1
# Depth: 2

package_vec
# [1] "cli"     "glue"    "utils"   "methods"
download_dep(package_vec)

caimiao0714/dnlddep documentation built on Dec. 19, 2021, 12:53 p.m.