datetimeValorisation3: datetimeValorisation3

Description Usage Arguments Examples

Description

Function to enrich a datetime object

Usage

1
2
datetimeValorisation3(input, variableName, workOrder,
  simplifiedVector = FALSE)

Arguments

input

a data frame or a vector : data frame must be in this format : id, datetimesee. See simplifiedVector for info on the format of the vector option

variableName

single length vector to indicate the prefix of the newly create variable in this format : paste0(variableName, "dependingOnWorkOrder")

workOrder

vector to include all transformation to do on the datetime object : c("year", "month", "day", "week", "wday", "wdayLabel", "ymd", "ym", "yw")

simplifiedVector

if simplifiedVector is TRUE, then the data frame is in a vector format containing the datetimes

Examples

1
2
x <- data.frame(x1 = 1:3, x2 = as.Date(c("2013-06-20", "2013-08-15", "2015-01-02")))
y <- datetimeValorisation3(x, "TypeA", c("year", "month", "day", "week", "wday", "wdayLabel", "ymd", "ym", "yw"), simplifiedVector = FALSE)

gwielinski/GWmisc documentation built on May 17, 2019, 9:31 a.m.