Learn R Programming

inegiR (version 2.0.0)

YoY: Calculates growth

Description

Year over year growth (or versus any period)

Usage

YoY(serie, lapso, decimal = TRUE)

Arguments

serie

numeric vector or series

lapso

period separations (12 = for monthly data, 4 = quaterly data)

decimal

Should result be in decimals? Default = TRUE. False returns percents x 100.

Value

Vector numeric

Examples

Run this code
# NOT RUN {
# Calculate inflation
# }
# NOT RUN {
token <- "webservice_token"
INPC <- serie_inegi(INPC, token)
Inflation <- YoY(INPC$Valores, 12)
# }

Run the code above in your browser using DataLab