month_cycle2numeric: coerce month_cycle to a numeric vector

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This will convert month codes or month names to numeric months.

Usage

1
2
3

Arguments

...

the expiration months of a future. See examples.

Details

Input can be a vector, comma-delimited string, or multiple strings. All inputs should be similar. Do not mix month names, codes and numbers in the same call.

MC2N is an alias

Value

numeric vector

Author(s)

Garrett See

See Also

M2C, C2M, next.future_id future

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
MC2N("H,M,U,Z") # from single string
MC2N(c("H","M","U","Z")) # from single vector
MC2N("h", "M", "u", "Z") # from multiple strings
MC2N(c("F","G"), "H", c("X","Z")) # from multiple vectors
month_cycle2numeric("Mar,jun,SEP,dEc") 
month_cycle2numeric("Mar", "jun", "SEP", "dEc")
MC2N("March,june,sep,decem")
MC2N("March, june, sep, decem") #spaces between commas are ok
month_cycle2numeric("3,6,9,12")
month_cycle2numeric(seq(3,12,3))

FinancialInstrument documentation built on May 2, 2019, 3:41 a.m.