Description Usage Arguments Value Examples
View source: R/func_twec_fiscal_month.R
Takes predictions from model object(s) and and combines it with actual values This function takes a vector of strings that represent the model object names
1 | twec_fiscal_month(month)
|
month |
A vector or data column containig date (either as a Date class or character). Must be in the format of YYYY-MM-DD (either as.Date format or character) |
twec_fiscal_month() will return a vector of integers representing the fiscal year month designations for TWEC
1 2 3 4 5 6 7 8 9 10 11 | library(predict2)
# example with vector containing character
date_vec = c('2017-01-30', '2017-12-21')
twec_fiscal_month(date_vec)
# example with a data frame already as.Date format
date_df = setNames(data.frame(c('2017-01-30', '2017-04-05', '2017-12-26')), c('date'))
date_df$date = as.Date(date_df$date, format = '%Y-%m-%d')
str(date_df)
twec_fiscal_month(date_df$date)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.