# NOT RUN {
# Create fake data with a Date column----
data <- RemixAutoML::FakeDataGenerator(
Correlation = 0.75,
N = 25000L,
ID = 2L,
ZIP = 0L,
FactorCount = 4L,
AddDate = TRUE,
Classification = FALSE,
MultiClass = FALSE)
for(i in seq_len(20L)) {
print(i)
data <- data.table::rbindlist(
list(data, RemixAutoML::FakeDataGenerator(
Correlation = 0.75,
N = 25000L,
ID = 2L,
ZIP = 0L,
FactorCount = 4L,
AddDate = TRUE,
Classification = FALSE,
MultiClass = FALSE)))
}
# Create calendar variables - automatically excludes
# the second, minute, and hour selections since
# it is not timestamp data
runtime <- system.time(
data <- RemixAutoML::CreateCalendarVariables(
data = data,
DateCols = "DateTime",
AsFactor = FALSE,
TimeUnits = c("second",
"minute",
"hour",
"wday",
"mday",
"yday",
"week",
"isoweek",
"wom",
"month",
"quarter",
"year")))
head(data)
print(runtime)
# }
Run the code above in your browser using DataLab