R/utilities-conditional.R
ifIncluded.Rd
Shortkey checking if arguments 1 is included in 2, output argument 3 if included, or output argument 4 otherwise.
ifIncluded(x, y, outputIfIncluded, outputIfNotIncluded = NULL)
argument 1
argument 2
argument 3
argument 4
ifIncluded("a", c("a", "b"), 1, 2) # 1 #> [1] 1 ifIncluded("x", c("a", "b"), 1, 2) # 2 #> [1] 2