twec_fiscal_month: Takes predictions from model object(s) and and combines it...

Description Usage Arguments Value Examples

View source: R/func_twec_fiscal_month.R

Description

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

Usage

1

Arguments

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)

Value

twec_fiscal_month() will return a vector of integers representing the fiscal year month designations for TWEC

Examples

 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)

bioticinteractions/predict2 documentation built on May 28, 2019, 7:12 p.m.