# NOT RUN {
# returns mtcars
assert(mtcars, not_na, vs)
# return mtcars
assert(mtcars, not_na, mpg:carb)
library(magrittr) # for piping operator
mtcars %>%
assert(in_set(c(0,1)), vs)
# anything here will run
# }
# NOT RUN {
mtcars %>%
assert(in_set(c(1, 2, 3, 4, 6)), carb)
# the assertion is untrue so
# nothing here will run
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab