I am learning R4DS,an example confused me,these two codes below show quite differently, I tried to make a new variable through mutate(),color1 = fct_rev(color),color1 has the same value as color has.
diamonds %>%
ggplot(aes(x = color, y = price)) +
geom_boxplot()
diamonds %>%
mutate(color = fct_rev(color)) %>%
ggplot(aes(x = color, y = price)) +
geom_boxplot()
I read the document,but helpless