I have a data set:
x y z
1 apple a 4
2 orange d 3
3 banana b 2
4 strawberry c 1
How can I change the name "banana" to "grape"? I want to get:
x y z
1 apple a 4
2 orange d 3
3 grape b 2
4 strawberry c 1
Reproducible code:
example<-data.frame( x = c("apple", "orange", "banana", "strawberry"), y = c("a", "d", "b", "c"), z = c(4:1) )