2. Inflation Analysis"

# Definir mirror do CRAN primeiro
options(repos = c(CRAN = "https://cloud.r-project.org/"))

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

get_inflation_rate()

Downloads monthly IPCA inflation data from Central Bank of Brazil.

Parameters

Usage

devtools::install_github("efram2/brfinance")
library(brfinance)

# Complete data (default)
inflation <- get_inflation_rate()

# Specific period in English
inflation_eng <- get_inflation_rate(
  start_date = "2020-01-01",
  end_date = "2024-12-01", 
  language = "eng"
)

# Portuguese version
inflation_pt <- get_inflation_rate(
  start_date = "2020-01-01", 
  language = "pt"
)

Output Structure

English:

# A tibble: 156 × 5
   date       monthly_inflation ytd_inflation twelve_month_inflation year
   <date>                 <dbl>         <dbl>                 <dbl> <dbl>
 1 2020-01-01             0.21          0.21                  4.18  2020

Portuguese:

# A tibble: 156 × 5
   data_referencia inflacao_mensal inflacao_acumulada_ano inflacao_12_meses   ano
   <date>                     <dbl>                 <dbl>             <dbl> <dbl>
 1 2020-01-01                 0.21                  0.21              4.18  2020

Returned data:



Try the brfinance package in your browser

Any scripts or data that you put into this service are public.

brfinance documentation built on Feb. 19, 2026, 9:06 a.m.