# NOT RUN {
options <- c("A", "B", "C")
# Let's check the "all" logic
check_opts(inputs = c("A", "B"), options, quiet = FALSE)
check_opts(inputs = c("X"), options, not = "message", quiet = FALSE)
check_opts(inputs = c("A","X"), options, not = "warning")
# Now let's check the "any" logic
check_opts(inputs = c("A","X"), options, type = "any")
check_opts(inputs = c("X"), options, type = "any", not = "message")
check_opts(inputs = c("A", NA), options, type = "any")
# Final trick: just ignore results
check_opts(inputs = "X", options, not = "invisible")
# }
Run the code above in your browser using DataLab