Last chance! 50% off unlimited learning
Sale ends in
If pkgs
is a vector of packages obtained from s_crandb
,
p_down
downloads from CRAN and saves in the dir
directory (by default
the current directory) the index page, the manual, the vignettes, the README, NEWS,
ChangeLog, CRAN checks files, the source code in pkg_ver.tar.gz format,
the binary code in pkg_ver.tgz (Mac OSX) or pkg_ver.zip (Windows)
format and a minimal R-script of each package. The files that do not exist are
ignored, with no warning.
If pkgs
is a list of packages obtained from s_crandb_list
,
p_down
saves the downloaded files in subdirectories named after the names
of the list, e.g. the keywords used at the search step. The names are
eventually modified with gsub(".", "_", make.names(pkg), fixed = TRUE)
to cope with Unix and Windows directory names.
p_down0
calls p_down
with different values for each argument.
With the default configuration, this function downloads nothing. It is mostly
used to download one specific item which has not been previously downloaded.
Visit p_downarch
to download tar.gz file(s) from CRAN archive.
p_down(..., char = NULL, index = TRUE, manual = TRUE,
vignettes = TRUE, README = TRUE, NEWS = FALSE, ChangeLog = FALSE,
checks = FALSE, targz = FALSE, binary = FALSE, type = "binary",
script = FALSE, dir = ".", crandb = get("crandb", envir =
.GlobalEnv), repos = getOption("repos")[1])p_down0(..., char = NULL, index = FALSE, manual = FALSE,
vignettes = FALSE, README = FALSE, NEWS = FALSE,
ChangeLog = FALSE, checks = FALSE, targz = FALSE, binary = FALSE,
type = "binary", script = FALSE, dir = ".",
crandb = get("crandb", envir = .GlobalEnv),
repos = getOption("repos")[1])
any format recognized by cnsc
, including list.
A vector or packages or a named list of packages (with names
being the keywords).
(name to) a character vector or a list. Use this argument if
...
fails or if you call the function from another function.
If used, argument ...
is ignored.
logical. Download the html index page of each package.
logical. Download the pdf manual.
logical. Download the html and pdf vignettes, if they exist.
logical. Download the README file, if it exists.
logical. Download the NEWS file, if it exists.
logical. Download the ChangeLog file, if it exists.
logical. Download the CRAN checks file.
logical. Download the *.tar.gz source file.
logical. Download the *.tgz (Mac OSX) or *.zip (Windows)
binary file, depending the type
value.
character. Either "mac.binary"
, "mac.binary.el-capitan"
,
or "win.binary"
. "binary"
seems also accepted.
See the type
section of utils::install.packages
.
logical. Create a mini-script to test the package.
character. The directory in which the files are saved.
Default value "."
is the current directory.
data.frame crandb
. The data.frame of CRAN packages.
character. The address of your local CRAN.
# NOT RUN {
## In real life, download crandb from CRAN or load it from your directory
## with functions crandb_down() or crandb_load().
## In this example, we use a small file.
crandb_load(system.file("data", "zcrandb.rda", package = "RWsearch"))
# }
# NOT RUN {
## Download the documentation in the "dirpkgs" directory. Flat representation.
p_down(pacman, pdfsearch, sos, dir = "dirpkgs", repos = "https://cloud.r-project.org")
## Download the documentation in subdirectories named after the keywords.
(lst <- s_crandb_list(thermodynamic, "chemical reaction"))
p_down(lst, dir = "dirpkgslist", repos = "https://cloud.r-project.org")
# }
Run the code above in your browser using DataLab