Harold Nelson
2023-02-06
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.3.6 ✔ purrr 0.3.4
## ✔ tibble 3.1.8 ✔ dplyr 1.0.10
## ✔ tidyr 1.2.1 ✔ stringr 1.4.1
## ✔ readr 2.1.2 ✔ forcats 0.5.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
##
## Attaching package: 'lubridate'
##
## The following objects are masked from 'package:base':
##
## date, intersect, setdiff, union
Convert the string “3-1-2022” to a date assuming that the 3 is March.
Convert the string “3-1-2022” to a date assuming that the 1 is January.
Convert the string “2022.3.1” to a date assuming that the 3 is March.
Convert the string “2022.3.1” to a date assuming that the 1 is January.
Convert the string “January 3, 2022” to a date.
Convert the string “3 Jan 2022” to a date.
Try to find a reasonable way to express a date that lubridate can’t figure out.
## Warning: All formats failed to parse. No formats found.
## [1] NA
Use make_date() to create a date in standard format given mo = 7; dy = 4; yr = 2023.
Review https://www.geeksforgeeks.org/how-to-use-date-formats-in-r/
Then create five different output versions of today’s date, which you can get from today().
## [1] "2023-02-06"
## [1] "02/06/23"