rptDate.offset: rptDate.offset

Description Usage Arguments Value Author(s) Examples

Description

rptDate.offset

Usage

1
rptDate.offset(rptDate, by, freq)

Arguments

rptDate

a vector of rptDate , with class Date.

by

a vector of integer

freq

charactor string: "y" or "q".

Value

a vector or a dataframe according to the length of rptDate and by.

Author(s)

Ruifei.Yin

Examples

1
2
3
4
5
6
7
8
9
# multi rptDate and 1 by:
rptDate.offset(as.Date(c("2016-03-31","2016-06-30","2016-09-30")),-1,"q")
rptDate.qoq(as.Date(c("2016-03-31","2016-06-30","2016-09-30")))
rptDate.offset(as.Date(c("2016-03-31","2016-06-30","2016-09-30")),-1,"y")
rptDate.yoy(as.Date(c("2016-03-31","2016-06-30","2016-09-30")))
# 1 rptDate and multi by:
rptDate.offset(as.Date("2016-03-31"),-2:0,"q")
# multi rptDate and multi by:
rptDate.offset(as.Date(c("2016-03-31","2016-06-30","2016-09-30")),-2:0,"q")

raphael210/QDataGet documentation built on May 26, 2019, 11:02 p.m.