assertthat
assertthat copied to clipboard
Assert packages, fixes #49
A new function, assert_packages(), can be used in place of code suggested by R Packages.
Instead of this:
if (!requireNamespace("pkg", quietly = TRUE)) {
stop("Package \"pkg\" needed for this function to work. Please install it.", call. = FALSE)
}
You can use this:
assertthat::assert_packages("pkg")
This PR fixes #49:
- adds
assert_packages()to new fileR/assert-packages.R - adds tests in new file
tests/testthat/test-packages/R - updates Roxygen to 6.1.1, roxygenizes package
- adds item to NEWS