Hi everyone, I have created the following text definitions that are trying to fix common misspelled words using a vector. I want to use the definition term to replace the terms on the right hand side that appear on multiple occasions on a column in a table I am trying to clean. I can't figure it out... grateful for any advice you can provide. Thank you!
cannabis <- c("cannabis")
spice/PS <- c("spice", "nps", "synthetic cannabis", "synthetic cannabinoid", "synthetic cannaboid", "mamba", "psychoactive")
tranquilisers <- c("zopli", "zopi", "zolpi", "ziplocane", "xanax", "xanex", "zispin", "mirtazapine", "mertazipine", "benzodiazepines", "valium", "diazapam", "diazepam", "tradazone", "trazodone", "ketamine")