powered by
Checks if includes all values using
all(values %in% x)
chk_superset(x, values, x_name = NULL)vld_superset(x, values)
vld_superset(x, values)
The chk_ function throws an informative error if the test fails or returns the original object if successful so it can used in pipes.
chk_
The vld_ function returns a flag indicating whether the test was met.
vld_
The object to check.
A vector of the permitted values.
A string of the name of object x or NULL.
vld_superset(): Validates Superset
vld_superset()
Other chk_set: chk_join(), chk_not_subset(), chk_orderset(), vld_not_subset(), vld_orderset()
chk_join()
chk_not_subset()
chk_orderset()
vld_not_subset()
vld_orderset()
# chk_superset chk_superset(1:3, 1) try(chk_superset(1:3, 4)) # vld_superset vld_superset(1:3, 1) vld_superset(1:3, 4) vld_superset(integer(0), integer(0))
Run the code above in your browser using DataLab