Skip to contents

[Experimental]

Usage

check_data(data, package)

test_data(data, package)

assert_data(data, package)

Arguments

data

A character string of the dataset name.

package

A character string of the package name.

Value

  • test_*: TRUE if it passes the test; FALSE otherwise.

  • assertion_*: An invisible TRUE if it passes the test; an error message otherwise.

Examples

if (requireNamespace("datasets", quietly = TRUE)) {
  test_data("mtcars", "datasets")
  #> [1] TRUE # Expected
}
#> [1] TRUE