if (FALSE) { # interactive()
# Default: from 2020 to current date (aligned with SELIC function)
df <- get_inflation_rate()
# Specific period with year-only format
df2 <- get_inflation_rate("2021", "2023")
# Using year-month format for precise month selection
df3 <- get_inflation_rate("2022-03", "2023-06")
# Portuguese column names and labels
df4 <- get_inflation_rate(language = "pt")
# Without variable labels
df5 <- get_inflation_rate("2020-01-01", "2022-12-31", labels = FALSE)
# Current year analysis
current_year <- format(Sys.Date(), "%Y")
df6 <- get_inflation_rate(start_date = current_year)
# Compare with SELIC rate (same default period)
selic_data <- get_selic_rate() # Also starts at 2020-01-01
inflation_data <- get_inflation_rate() # Same start date
}
Run the code above in your browser using DataLab