I have a character vector of misspelled words:
wordswrong <- c("veh", "crrts", "ornges")
wordscorrect <- c("vehicle", "carrots", "oranges")
Here's a dataframe:
words <- data.frame(terms = c("crrts oranges",
+ "car is a veh",
+ "orngs bannas peas"))
How can I go through each word in words$terms and update based on my two vectors?