diff --git a/factors.Rmd b/factors.Rmd index 4211955..0a35715 100644 --- a/factors.Rmd +++ b/factors.Rmd @@ -274,8 +274,8 @@ ggplot(by_age, aes(age, prop, colour = fct_reorder2(marital, age, prop))) + labs(colour = "marital") ``` -Finally, for bar plots, you can use `fct_infreq()` to order levels in increasing frequency: this is the simplest type of reordering because it doesn't need any extra variables. -Combine it with `fct_rev()` if you want the largest values on the right, not the left. +Finally, for bar plots, you can use `fct_infreq()` to order levels in decreasing frequency: this is the simplest type of reordering because it doesn't need any extra variables. +Combine it with `fct_rev()` if you want them in increasing frequency so that in the bar plot largest values are on the right, not the left. ```{r} #| fig.alt: >