While reading through the Staring with data lesson, I noticed one of the challenges states "Now that we have renamed the factor level to "undetermined", can you recreate the barplot such that "undetermined" is last (after "male")?". However, due to the way the data is arranged, the previous plot in the lesson already has "undetermined" after both "male" and "female". I would suggest rewording the challenge to say "Now that we have renamed the factor level to "undetermined", can you recreate the barplot such that "undetermined" is first (before "female")?". The answer would need to be changed to...
sex <- factor(sex, levels = c("undetermined", "female", "male"))
This would give learners the opportunity to see how changing the order of levels of a factor influences the order in which the data is plotted. I believe this was originally intended, but not quite shown, with the existing challenge.
While reading through the Staring with data lesson, I noticed one of the challenges states "Now that we have renamed the factor level to "undetermined", can you recreate the barplot such that "undetermined" is last (after "male")?". However, due to the way the data is arranged, the previous plot in the lesson already has "undetermined" after both "male" and "female". I would suggest rewording the challenge to say "Now that we have renamed the factor level to "undetermined", can you recreate the barplot such that "undetermined" is first (before "female")?". The answer would need to be changed to...
This would give learners the opportunity to see how changing the order of levels of a factor influences the order in which the data is plotted. I believe this was originally intended, but not quite shown, with the existing challenge.