hadley <- strsplit("hadley", "")[[1]]
vec_match(hadley, letters)
vowels <- c("a", "e", "i", "o", "u")
vec_match(hadley, vowels)
vec_in(hadley, vowels)
# Only the first index of duplicates is returned
vec_match(c("a", "b"), c("a", "b", "a", "b"))
Run the code above in your browser using DataLab