-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change levels to unique in vector attributes lesson #342
Comments
I wonder if this is due to |
Yes, I believe that @jsta is correct that this behavior is due to the change in the default value of Just changing
I'd be happy to take care of this, but I need some advice about which of these options to choose. My inclination would be to go with Option (1), as it will simplify the lesson a little, and there doesn't seem to be any reason to convert the strings to factors for the purposes of visualizing the data. However, if there was a specific pedagogical reason to include a review of factors in this lesson, then Option (2) would be preferable. |
I like option 1 as well. I don't think we have any ggplot code that relies on factors that would be my only hesitation. |
There is code that relies on the ordering of the factors. It still works if
The alert reader will notice that So now I'm starting to lean toward Option 2. It is natural to want to customize the order of things in plots, and you can't do that without grappling with factors. We can recover the pre-version 4.0 behavior by adding |
Thanks all for picking up this issue. It seems like |
After consideration, PR #353 seems like the "nuclear option" to me. It requires so much more typing on the learners' part. What about using Then still discuss factors but move it to a better spot somewhere just before factor-plotting. |
What if we use |
According to this post, the There are only three read commands in which learners would have to type |
We taught this lesson last month. What was a bigger deal was running out of memory in our RStudio hub environment. |
In Explore and Plot by Vector Layer Attributes, the lesson is about seeing unique values and uses
levels(lines_HARV$TYPE)
, which producesNULL
because the column is not defined as a factor. I would suggestunique(lines_HARV$TYPE)
instead.The text was updated successfully, but these errors were encountered: