check_package | R Documentation |
Run check_file
on a package's source.
check_package(path, pattern = "\\.[rR]$", ...)
path |
Path to the package to be checked. |
pattern |
A pattern to search files with, see |
... |
Arguments to be passed to |
The function catches the messages of "cleanr"-conditions
throw
n by check_file
and, if it caught any,
throw
s them.
Invisibly
TRUE
,
but see Details.
Other wrappers:
check_directory()
,
check_file_layout()
,
check_file()
,
check_function_layout()
,
check_functions_in_file()
# create a fake package first:
package_path <- file.path(tempdir(), "fake")
usethis::create_package(package_path, fields = NULL,
rstudio = FALSE, open = FALSE)
directory <- system.file("runit_tests", "source", "R_s4",
package = "cleanr")
file.copy(list.files(directory, full.names = TRUE), file.path(package_path,
"R"))
RUnit::checkTrue(cleanr::check_package(package_path, check_return = FALSE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.