gmon: A class for generalized month index

Description Usage Arguments Details Examples

Description

In the "gmon" class, a integer number is used to indicate the month. The number from 1 to 12 is used to indicate Jan to Dec of the reference year. The number from -11 to 0 is used to indicate Jan to Dec of the previous year, and the number from 13 to 24 corresponds to the next year, and so on.

Usage

1
gmon(x)

Arguments

x

a vector of integers.

Details

When print a "gmon" object, the suffix ".0" means the current year, ".1" means the next year and ".-1" means the previous year, and so on. For example, Feb of the next year is printed as "Feb.1". The methods scale_x_gmon and scale_y_gmon are provided to show "gmon" objects properly based on ggplot.

Examples

1
2
3
4
5
mvec <- gmon(-20:25)
print(mvec)
x <- 1 : 46
names(x) <- mvec
print(x)

zoocat documentation built on May 2, 2019, 10:22 a.m.