Open djhunter opened 2 years ago
Similar issues exist in the solution to the final two challenges
Add
HARV_lines$BicyclesHo <- factor(HARV_lines$BicyclesHo)
to the first challenge, and add
state_boundary_US$region <- factor(state_boundary_US$region)
to the second.
Now I'm wondering if I should have used as.factor
instead of factor
in the above. (Matter of style; I think the result should be identical in this case.)
Alternatively, with the tidyverse, you could use as_factor
, but then the levels will be in a different order. To control the ordering of the levels, you can use fct_relevel
.
The discussion in the "Customize Plots" section of episode 7 is wrong because
HARV_lines$TYPE
is not a factor.Suggestion, delete the following because it is confusing:
Replace with:
Convert the
TYPE
column to a factor and view its levels: