ps_separate_date.Rd
Separates Date into Year, Month and Day.
ps_separate_date(
data,
col = "Date",
into = c("Year", "Month", "Day"),
remove = TRUE
)
A data frame.
A column name or position.
A character vector of length 3 specifying the names for the year, month and day components.
A flag specifying whether to remove the original column.
data <- data.frame(Date = Sys.Date())
ps_separate_date(data)
#> Year Month Day
#> 1 2022 5 19