Consider this basic dataset:
myfruit <- tibble(fruit = c("apple", "orange", "apple", "pear", "banana"),
quantity = c("10","20","10","30", "40"))
Using R, how can I rename all values in the "fruit" column which display "apple" to "mango", without changing its associated "quantity" value? I know you can manually change the values but what is a more efficient method for larger datasets?
Any help would be much appreciated - many thanks, Karima