datacarpentry / R-ecology-lesson

Data Analysis and Visualization in R for Ecologists
https://datacarpentry.org/R-ecology-lesson/
Other
314 stars 508 forks source link

lubridate is a core part of the tidyverse starting in v2.0.0 #879

Closed mikemahoney218 closed 4 months ago

mikemahoney218 commented 1 year ago

What is the problem?

The Formatting Dates section of the lesson contains the text:

https://github.com/datacarpentry/R-ecology-lesson/blob/f402c81d5e053a06755efa313e9de3aebfd19bc6/episodes/02-starting-with-data.Rmd#L730-L743

This changed in February, when lubridate became part of the core tidyverse: https://github.com/tidyverse/tidyverse/releases/tag/v2.0.0

And indeed, lubridate is now loaded when loading the tidyverse:

> library(tidyverse)
── Attaching core tidyverse packages ───────────────────────────────────────────────────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.2     ✔ readr     2.1.4
✔ forcats   1.0.0     ✔ stringr   1.5.0
✔ ggplot2   3.4.2     ✔ tibble    3.2.1
✔ lubridate 1.9.2     ✔ tidyr     1.3.0
✔ purrr     1.0.2     

Does it make sense to drop this text? Some learners might have older versions of the tidyverse installed, which might cause issues if the section is dropped, but as-is it might be confusing for learners with a new tidyverse install to see "lubridate" in the list of attached packages and then told they need to re-load it now.

Location of problem (optional)

https://datacarpentry.org/R-ecology-lesson/instructor/02-starting-with-data.html#formatting-dates

tobyhodges commented 4 months ago

Thanks @mikemahoney218 for opening this issue. The lesson underwent a major update and reorganisation when https://github.com/datacarpentry/R-ecology-lesson/pull/887 was merged. The current content describes lubridate as follows:

To turn this column into a proper date, we will use a function from the tidyverse’s lubridate package, which has lots of useful functions for working with dates.

However, lubridate in mentioned separately in the list of packages to install, so I think we need to open a new issue to recognise that redundancy.