STAT545-UBC / Discussion

Public discussion
37 stars 20 forks source link

Clarification on HW05 Exercise 2 #563

Closed dy-lin closed 4 years ago

dy-lin commented 4 years ago

For the Gapminder questions:

Use the forcats package to change the order of the factor levels, based on summarized information of one of the quantitative variables. Consider experimenting with a summary statistic beyond the most basic choice of the mean/median. Use the forcats package in the tidyverse for this, rather than the baseR function as.factor.

Can I order the factor levels on a quantitative variable that isn't shown in the plot? (i.e. a geom_bar plot of count vs continent but order the factors by mean lifeExp?) I am asking because if that is the case, then it is not immediately obvious on the plot what I am ordering by like it would be if I ordered by counts, or plotted mean lifeExp vs continent?

wvictor14 commented 4 years ago