expect-deprec {testdat} | R Documentation |
These functions are deprecated.
expect_func(var, ...)
expect_join(data2, by = NULL, not = FALSE, flt = TRUE, data = get_testdata())
expect_similar(
var,
data2,
var2,
flt = TRUE,
flt2 = flt,
threshold = 0.05,
min = 100,
data = get_testdata()
)
expect_allany(
vars,
func,
flt = TRUE,
data = get_testdata(),
args = list(),
allany = c(chk_filter_all, chk_filter_any),
func_desc = NULL
)
var |
An unquoted column name to test. |
... |
Arguments to pass to |
data2 |
The data frame to compare against. |
by |
A character vector of columns to join by. See |
not |
Reverse the results of the check? |
flt |
< |
data |
A data frame to test. The global test data is used by default. |
var2 |
An unquoted column name from data2. |
flt2 |
A filter specifying a subset of data2 to test. |
threshold |
The maximum proportional difference allowed between the two categories. |
min |
The minimum number of responses for a category to allow comparison. This avoids small categories raising spurious errors. |
vars |
< |
func |
A function to use for testing that takes a vector as the first argument and returns a logical vector of the same length showing whether an element passed or failed. |
args |
A named list of arguments to pass to |
allany |
The function to combine the |
func_desc |
A human friendly description of |
expect_*()
functions are mainly called for their side effects. The
expectation signals its result (e.g. "success", "failure"), which is logged
by the current test reporter. In a non-testing
context the expectation will raise an error with class
expectation_failure
if it fails.