all_in | R Documentation |
Check whether a vector are all elements of another vector
all_in(x, table) x %all_in% table
x |
The values to be matched. |
table |
The values to be matched against. |
## Not run: library(assertthat) assert_that(c(1, 2) %all_in% c(0, 1, 2, 3, 4)) # TRUE assert_that("a" %all_in% letters) # TRUE assert_that("A" %all_in% letters) # Error: "A" is missing 1 element from letters: "A" assert_that(1:10 %all_in% letters) # Error: 1:10 is missing 10 elements from letters: 1L, 2L, 3L, ... ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.