if(interactive()){
messy_trees = c("red oak", "williw", "hemluck", "white elm", "fir tree",
"birch tree", "pone", "dagwood", "mople")
clean_trees = c("oak", "willow", "hemlock", "elm", "fir", "birch", "pine", "dogwood", "maple")
cleaned_trees = cat_replace(messy_trees, clean_trees)
}
Run the code above in your browser using DataLab