Description Usage Arguments Examples
Project dates to lower dimensional subspace. Extracts components year, month, yday, mday, hour, minute, weekday, bizday and season from a date object
1 2 3 | projectDate(dates, size = c("narrow", "wide"),
holidays = holidayNYSE(year = unique(year(dates))),
as.numeric = F, drop = T)
|
dates |
date or datetime objects |
size |
either "narrow" or "wide". If narrow, returns a data frame containing the projections as column variables using factors. If wide, returns a sparse matrix containing the projections as column variables using 0-1 variables |
holidays |
argument to determine which days are considered holidays, affecting the business day projection. By default uses holidayNYSE() provided by the timeDate package, or can be specified as a vector of strings representing dates in the yyyy-mm-dd format |
as.numeric |
logical only used when size = "narrow". Returns the columns as numeric values instead of factors |
drop |
logical. If true, drop any column that only has 1 level or only 1 unique element in it |
1 2 | dates = timeSequence(from = "2001-01-01", to = "2004-01-01", by = "day")
projectDate(as.Date(dates))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.