In contrast to
checkSetEqual, the function tests for a true
permutation of the two vectors and also considers duplicated values.
Missing values are being treated as actual values by default.
Does not work on raw values.
checkPermutation(x, y, na.ok = TRUE) check_permutation(x, y, na.ok = TRUE) assertPermutation(x, y, na.ok = TRUE, .var.name = vname(x), add = NULL) assert_permutation(x, y, na.ok = TRUE, .var.name = vname(x), add = NULL) testPermutation(x, y, na.ok = TRUE) test_permutation(x, y, na.ok = TRUE) expect_permutation(x, y, na.ok = TRUE, info = NULL, label = vname(x))
Object to check.
Vector to compare with. Atomic vector of type other than raw.
Are missing values allowed? Default is
Name of the checked object to print in assertions. Defaults to the heuristic implemented in
Collection to store assertion messages. See
Extra information to be included in the message for the testthat reporter. See
Name of the checked object to print in messages. Defaults to the heuristic implemented in
Depending on the function prefix: If the check is successful, the functions
x invisibly, whereas
If the check is not successful,
throws an error message,
return a string with the error message.
expect_permutation always returns an
x must be of the same type as the set w.r.t.
Integers and doubles are both treated as numeric.