cs_parse_date: Separate Date Occur

Description Usage Arguments Value Examples

View source: R/dates.R

Description

Creates two columns. One contains month, day, and year and the other contains hour, and minute.

Usage

1
cs_parse_date(.data, var, dateVar, timeVar, tz = NULL, keepDateTime = TRUE)

Arguments

.data

A tibble or data frame

var

A column containing month, day, year, and time separated by /

dateVar

Name of new column to contain date data

timeVar

Name of new column to contain time data

tz

String name of timezone, defaults to system's timezone

keepDateTime

A logical scalar. Keep an intermediate dateTime variable if TRUE.

Value

A copy of the object with two columns appended. One is the time data and the other is the date data.

Examples

1
2
3
4
5
# load example data
testData <- january2018

# parse date occured
testData <- cs_parse_date(testData, var = date_occur, dateVar = dateOcc, timeVar = timeOcc)

compstatr documentation built on July 8, 2020, 7:34 p.m.