-
-
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
Use readr::read_csv()
throughout the lesson
#663
Use readr::read_csv()
throughout the lesson
#663
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for taking the time to work on this @Teebusch!
My only suggestion would be to remove (or make an aside) the comparison between the base data.frame
object and the tibble
given that most of the workshop participants will not know what a data.frame
is and the comparison will add cognitive load.
Everything else is a great improvement to the current content. So thanks again!
02-starting-with-data.Rmd
Outdated
with the function `str()`: | ||
|
||
```{r, purl=FALSE} | ||
str(surveys) | ||
``` | ||
|
||
You might have noticed that our data frame is actually a "tibble". A tibble is a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this might introduce confusion to learners as they probably won't know the difference between an object of class data.frame
and a tibble
if this is their first exposure to R.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree! See my suggested changes in 4991253
would another @datacarpentry/r-ecology-lesson-maintainers be willing to also review this PR? Thanks! |
Co-authored-by: François Michonneau <francois.michonneau@gmail.com>
Co-authored-by: François Michonneau <francois.michonneau@gmail.com>
change heading to "Inspecting data frames" and make headline capitalization consistent
The distinction between tibbles and data frames became less important with the change to "stringsAsFactors = FALSE", so it should be safe to treat them as more or less the same for this lesson. Hopefully this reduces cognitive load.
@fmichonneau I'll review this PR as a second. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the changes looks good to me.
Thank you both! |
Currently, "starting with data" introduces base R's
read.csv()
, but "Manipulating data" then switches toreadr::read_csv()
.SInce R 4.0 the default behavior of both functions is to read strings as character vectors, so there is little reason to introduce both. For beginners the confusion that this creates is arguably larger than the insights gained from it, as evidenced by some of the issues here.
This is related to a number of issues and might close some of them:
#609 #471 #608 #553 #555 #559 #616 #645
The main change is: