3
I’m practicing with the pack hflights
I install the package;
I load the package; and
I carry the lubridate
install.packages("hflights")
library(hflights)
library(lubridate)
The data (Year
, Month
, DayofMonth
) come separate and would like to join them.
To this end, I combined the function ymd()
of lubridate
along with the function paste0
of base
, as follows:
hflights %>%
mutate(dt=ymd(paste0(Year, "0", Month, DayofMonth))) %>%
select(dt) %>%
head()
Apparently, it worked:
dt
1 2011-01-01
2 2011-01-02
3 2011-01-03
4 2011-01-04
5 2011-01-05
6 2011-01-06
Warning message:
39539 failed to parse.
It turns out that the result came accompanied by the message
Warning message:
39539 failed to parse.
I know this doesn’t mean a mistake, but a warning message. I just couldn’t identify what that warning means. The R failed to analyze what, more precisely?