sysInstallAndDownload {Require} | R Documentation |
download.files or install.packages in a separate process
Description
This uses sys
package so that messaging can be controlled. This also provides
the option to parallelize by spawning multiple background
process to allow
parallel e.g., downloads. Noting that if libcurl
is installed (and detected
using capabilities("libcurl")
), then no explicit parallelism will be allowed,
instead method = "libcurl"
will be passed enabling parallel downloads.
Usage
sysInstallAndDownload(
args,
splitOn = "pkgs",
doLine = "outfiles <- do.call(download.packages, args)",
returnOutfile = FALSE,
doLineVectorized = TRUE,
tmpdir,
libPaths,
verbose
)
Arguments
args |
A list with all arguments for a do.call to either |
splitOn |
A character vector of the names in |
doLine |
A character string with the |
returnOutfile |
A logical. If |
doLineVectorized |
A logical. If |
tmpdir |
A single path where all downloads will be put |
libPaths |
The library path (or libraries) where all packages should be
installed, and looked for to load (i.e., call |
verbose |
Numeric or logical indicating how verbose should the function
be. If -1 or -2, then as little verbosity as possible. If 0 or FALSE,
then minimal outputs; if |
Value
Mostly for side effects, namely installed packages or downloaded packages or
files. However, in the case of returnOutfile = TRUE
, then a list of
filenames will be returned with any outputs from the doLine
.