-
-
Notifications
You must be signed in to change notification settings - Fork 506
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
Starting with data episode generates a few issues in R 4.0.0 #609
Comments
Hello! Regarding (1), it seems that with categorical data read in as characters vs. factors, the answer to the third question in the first challenge cannot be discerned as the output from str(surveys) does not provide the number of levels for surveys$species. This Challenge could be re-tooled to accommodate this question, or alternatively differences between character vs. factor could be explored elsewhere as you suggest in (2). Also regarding (1), if you run the following code you will see that indeed there are 48 species:
Thoughts? |
Hrm....
Also
I think the issue is, there are 48 if you combine genus and species
|
OK, I'm an idiot, and I apologies - the |
1 - Indeed, the species column has multiple entries that are "sp.". For non-ecologists, the hierarchy of genus and species may not be obvious. I think this issue can be solved easily by adding a short note to the challenge (e.g., "hint: use the 2 - The issue with stringsAsFactors in R>4.0 is larger. One temporary and not too confusing workaround would be to first show |
addressed with #663 |
R version 4.0.0 (2020-04-24)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.4
Starting with data episode
In the first challenge, 'Based on the output of str(surveys), can you answer the following questions?', there are 40 species not 48 as proposed in the answer.
In the Renaming factors subsection, plot(surveys$sex)returns an error and warning messages because read.csv read in the vector sex as character not factor in R 4.0.0. Subsequent code such as levels(sex) etc return NULL so this solution would be a good learning revision
sex <- factor(surveys$sex)
The text was updated successfully, but these errors were encountered: