Below codes I copied from an example in this community:
fruits <- c("one apple", "two pears", "three bananas")
str_remove(fruits, "[aeiou]")
str_remove_all(fruits, "[aeiou]")
But when I run it, there was a warning for str_remove(fruits, "[aeiou]") such:
Error in str_replace_all(., pattern = remove_words %>% paste0("(", ., :
could not find function "str_replace_all"
and str_remove_all(fruits, "[aeiou]") such:
Error during wrapup: could not find function "str_remove_all"
Can anyone please explain why the codes were not working?