add_periods: Add new fiscal information fields to a dataframe

Description Usage Arguments Examples

Description

This function will return a dataframe with fiscal period information added. It will only accept valid date fields (date, POSIXct, POSIXlt)

Usage

1
add_periods(df, date_col)

Arguments

df

dataframe you want add information to

date_col

field on which all calculations will be made

Examples

1
2
3
4
5
6
7
add_periods(myydataframe, "createddate_col")
will return mydataframe with the following new columns:
createddate_col_period
createddate_col_qtr
createddate_col_year
createddate_col_year_qtr
createddate_col_month_end

keithabailey/PRMTools documentation built on May 20, 2019, 8:45 a.m.