ps_separate_date: Separate Date

View source: R/separate.R

ps_separate_dateR Documentation

Separate Date

Description

Separates Date into Year, Month and Day.

Usage

ps_separate_date(
  data,
  col = "Date",
  into = c("Year", "Month", "Day"),
  remove = TRUE
)

Arguments

data

A data frame.

col

A column name or position.

into

A character vector of length 3 specifying the names for the year, month and day components.

remove

A flag specifying whether to remove the original column.

Examples

data <- data.frame(Date = Sys.Date())
ps_separate_date(data)

poissonconsulting/poisix documentation built on May 28, 2022, 10:42 p.m.