Skip to content
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

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

Closed
mikemahoney218 opened this issue Nov 11, 2023 · 1 comment
Closed

Comments

@mikemahoney218
Copy link
Member

What is the problem?

The Formatting Dates section of the lesson contains the text:

We are going to use the `ymd()` function from the package
**`lubridate`** (which belongs to the **`tidyverse`**; learn more
[here](https://www.tidyverse.org/)). **`lubridate`** gets installed as
part as the **`tidyverse`** installation. When you load the
**`tidyverse`** (`library(tidyverse)`), the core packages (the packages
used in most data analyses) get loaded. **`lubridate`** however does not
belong to the core tidyverse, so you have to load it explicitly with
`library(lubridate)`
Start by loading the required package:
```{r load-package, message=FALSE, purl=FALSE}
library(lubridate)
```

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.2readr     2.1.4forcats   1.0.0stringr   1.5.0ggplot2   3.4.2tibble    3.2.1lubridate 1.9.2tidyr     1.3.0purrr     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
Copy link
Member

Thanks @mikemahoney218 for opening this issue. The lesson underwent a major update and reorganisation when #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants