check_archive {packager} | R Documentation |
Check a Package Archive
Description
This is a wrapper to
callr::rcmd_safe("check")
,
similar to, but leaner than
rcmdcheck::rcmdcheck
. While
the latter parses the output of rcmd_safe
and uses
clisymbols in the callback, we here just return bare output and use
writeLines
as callback. This should result in a screen display
that is identical to the output of R CMD check
.
Usage
check_archive(path, cmdargs = NULL)
check_archive_as_cran(path)
Arguments
path |
Path to the package archive. |
cmdargs |
Command line arguments (see
|
Value
A list with standard output, standard error
and exit status of the check.
(see callr::rcmd
).
Note
check_archive_as_cran
is a convenience Wrapper to
check_archive
.
See Also
Other maintenance functions:
check_codetags()
,
check_cyclomatic_complexity()
,
check_news()
,
check_usage()
,
get_check_status()
Other maintenance functions:
check_codetags()
,
check_cyclomatic_complexity()
,
check_news()
,
check_usage()
,
get_check_status()
Examples
## Not run:
package_path <- file.path(tempdir(), "fakepack")
usethis::create_package(path = package_path)
file.copy(system.file("templates", "throw.R", package = "fakemake"),
file.path(package_path, "R"))
roxygen2::roxygenize(package_path)
print(tarball <- get_pkg_archive_path(package_path))
pkgbuild::build(pkg = package_path, path = package_path)
print(check_archive(tarball))
## End(Not run)