run_R_CMD {pkgutils} | R Documentation |
R CMD
Externally call R CMD
, e.g. for checking or
installing R packages, or conduct some postprocessing
after checking or installation.
run_R_CMD(x, ...) ## S3 method for class 'character' run_R_CMD(x, what = "check", ..., sudo = identical(what, "INSTALL"), system.args = list()) copy_pkg_files(x, ...) ## S3 method for class 'character' copy_pkg_files(x, what = "scripts", to = file.path(Sys.getenv("HOME"), "bin"), installed = TRUE, ignore = NULL, overwrite = TRUE, ...) delete_o_files(x, ...) ## S3 method for class 'character' delete_o_files(x, ext = "o", ignore = NULL, ...)
x |
For For |
what |
Character scalar with the name of the command
used by |
sudo |
Logical scalar. Prepend a |
system.args |
Optional list of arguments passed to
|
to |
Character vector indicating the target folder(s) or file(s). |
overwrite |
Logical scalar passed to
|
ext |
Character vector with file extensions to
consider. Need not contain the leading dot. Content of
|
... |
For |
installed |
Logical scalar. If |
ignore |
|
Windows users might need to install Rtools for
run_R_CMD
to work, see
http://cran.r-project.org/bin/windows/Rtools/.
copy_pkg_files
copies package files after
installation. This is mainly intended for script files,
which should often be placed in a directory for
executable files. The docu.R
and
merge.R
scripts that come with the
pkgutils package are examples for such files.
delete_o_files
removes object files in the
‘src’ subdirectory of a package remaining from
previous compilation attempts, if any.
The return value of run_R_CMD
is the one of the
call of R CMD
, depending on system.args
,
by default an integer indicating success or failure.
copy_pkg_files
returns a logical vector. See
file.copy
from the base package for details.
delete_o_files
also returns a logical vector, this
time indicating whether deletion succeeded. See
file.remove
from the base package.
base::system base::file.copy base::file.remove
Other package-functions: check_R_code
,
check_Sweave_start
,
is_pkg_dir
,
logfile
, pack_desc
,
pkg_files
,
swap_code
,
# Running R CMD <what>: see the 'docu.R' script provided with this package,
# options '--check', # '--install' and '--yes'.
# Copying files: see the 'docu.R' script provided with this package, options
# '--target' and '--exclude'.
# Deleting object files: see the 'docu.R' script provided with this package,
# option '--zapoff'.