The
lubridate package is essential for working with dates and fits well with the Tidyverse. It is not, however, loaded when you import the
tidyverse package, so you need to explicitly load it.
Time Points
You can create dates and dates with time-of-day information using variations of the
ymd() function
. The letters
y,
m, and
d stand for year, month, and day, respectively. With
ymd() you should write your data in a format that puts the year first, the month
second, and the day last. The function is very flexible in what it can parse as a date.