Learn R Programming

rb3 (version 0.0.12)

code2month: Get month from maturity code

Description

Get the corresponding month for the string that represent maturities of futures contracts.

Usage

code2month(x)

Value

a vector of integers

Arguments

x

a character with letters that represent the month of maturity of futures contracts.

Examples

Run this code
code2month(c("F", "G", "H", "J", "K", "M", "N", "Q", "U", "V", "X", "Z"))
code2month(c("JAN", "FEV", "MAR", "NOV", "DEZ"))

Run the code above in your browser using DataLab