Learn R Programming

leerSIECyL (version 1.0.2)

componerPeriodos: Function to create a vector of texts with the periods to consult

Description

Function to create a vector of texts with the periods to consult.

Usage

componerPeriodos(annos, mes = NULL, frecuencia = "TRIMESTRE")

Arguments

annos

A vector with the years to consult.

mes

Number to indicate the periods within the year to consult.

frecuencia

Type of period. Year (A), Quarter (T) or Month (M)

Value

A vector with the periods in the format neccessary for the consult.

Details

The parameter mes is a number between 1 and 4 if the patameter frecuencia is Quarterly, from 1 to 12 if it is monthly and it is not used if it is annual, he frequency parameter is a text of which only the first letter is used: A or Y for annual, Q or T for quarterly or M for monthly.

Examples

Run this code
# NOT RUN {
##----Example
   componerPeriodos(2007:2009,2:4,'Q')
   componerPeriodos(2017,frecuencia='M')
   componerPeriodos(2017,frecuencia='A')
# }

Run the code above in your browser using DataLab