testSubset(c("a", "z"), letters)
testSubset("ab", letters)
testSubset("Species", names(iris))
# x is not converted before the comparison (except for numerics)
testSubset(factor("a"), "a")
testSubset(1, "1")
testSubset(1, as.integer(1))
Run the code above in your browser using DataLab