Description Usage Arguments Value Author(s) Examples
View source: R/engineerDateTime.R
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
1 | engineerDateTime(x, datetimeFeats, autoCode = TRUE)
|
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 |
List containing data.frame with date engineered features as well as code when autoCode is TRUE
Xander Horn
1 2 3 | x <- iris
x$date <- Sys.Date() + as.integer(row.names(x))
feats <- engineerDateTime(x = x, datetimeFeats = "date")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.