engineerDateTime: Engineer date features

Description Usage Arguments Value Author(s) Examples

View source: R/engineerDateTime.R

Description

Creates new featues based off of existing date features and then drops the date features after engineering has taken place. Features created include year, month, week, day, weekday, hour, minute, second

Usage

1
engineerDateTime(x, datetimeFeats, autoCode = TRUE)

Arguments

x

[data.frame | Required] Data.frame containing numeric features to transform

datetimeFeats

[character vector | Required] Character vector of date/ datetime features. Date time features cannot have the same value

autoCode

[logical | Optional] Should code be generated when running the function

Value

List containing data.frame with date engineered features as well as code when autoCode is TRUE

Author(s)

Xander Horn

Examples

1
2
3
x <- iris
x$date <- Sys.Date() + as.integer(row.names(x))
feats <- engineerDateTime(x = x, datetimeFeats = "date")

XanderHorn/autoML documentation built on Aug. 5, 2020, 11:45 a.m.