R, I tried changing some strings in a particular column with mutate() and str_replace function, but I'm surprised 3 out of the 5 strings changed and 2 remain unchanged.
food_quantity <- food_quantity %>%
mutate(Food_Group = str_replace(Food_Group, "Live meat animals (1000) 2/", "Live meat animals")) %>%
mutate(Food_Group = str_replace(Food_Group, "Fish and shellfish 3/", "Fish and shellfish")) %>%
mutate(Food_Group = str_replace(Food_Group, "Fruits 4/", "Fruits")) %>%
mutate(Food_Group = str_replace(Food_Group, "Other foods 5/", "Other foods")) %>%
mutate(Food_Group = str_replace(Food_Group, "Beverages (1000 KL) 6/", "Beverages"))
The image shows the Live Meat Animals (1000) unchanged, and Beverages (1000 KL) remain unchanged as well, while other strings changed.
