View source: R/assert_arguments.R
assert_pkg_path | R Documentation |
Assertions for pkg and pkg_path in packager_functions.
assert_pkg_path(pkg, pkg_path, add)
pkg |
[ |
pkg_path |
[ |
add |
[ |
The function does not set up and report the AssertCollection This need to be done separately, see example.
An AssertCollection that have been updated with the results
of assertions for pkg
and pkg_path
.
Petter Hopp Petter.Hopp@vetinst.no
# Attach package and make temporary directory
library(NVIpackager)
td <- tempdir()
if (!dir.exists(file.path(td, "NVItest"))) {
dir.create(file.path(td, "NVItest"))
}
# ARGUMENT CHECKING
# Object to store check-results
checks <- checkmate::makeAssertCollection()
# Perform checks
checks <- assert_pkg_path(pkg = "NVItest",
pkg_path = paste0(td, "/NVItest"),
add = checks)
# Report check-results
checkmate::reportAssertions(checks)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.