How to convert between year,month,day and dates in R?
I know one can do this via strings, but I would prefer to avoid converting to strings, partly because maybe the
I'm a bit late to the party, but one other way to convert from integers to date is the lubridate::make_date function. See the example below from R for Data Science:
lubridate::make_date
library(lubridate) library(nycflights13) library(tidyverse) a <- flights %>% mutate(date = make_date(year, month, day))