--- title: "Selic and Interest Rates" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{SELIC Rate Data} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} options(repos = c(CRAN = "https://cloud.r-project.org/")) knitr::opts_chunk$set(collapse = TRUE, comment = "#>") ``` ## get_selic_rate() Downloads the daily SELIC rate series from Central Bank of Brazil. ### Parameters - `start_year`: Starting year (e.g., 2020) - `end_year`: Ending year (e.g., 2024) - `language`: Column names language - `"eng"` (default) or `"pt"` ### Usage ```{r message=FALSE, warning=FALSE, paged.print=FALSE} library(brfinance) # English version selic_eng <- get_selic_rate(2020, 2024) head(selic_eng) # Portuguese version selic_pt <- get_selic_rate(2020, 2024, language = "pt") head(selic_pt) ``` ## plot_selic_rate() Creates a time series plot of SELIC rate. ### Parameters - `data`: Data from `get_selic_rate()` - `language`: Plot labels language - `"eng"` (default) or `"pt"` ### Usage ```{r selic-plot-improved, fig.height=5, fig.width=10, fig.align='center', out.width='90%'} # Get data selic_data <- get_selic_rate(2020, 2024) # Create plot selic_plot <- plot_selic_rate(selic_data, language = "eng") print(selic_plot) ``` ```{r selic-plot-improved2, fig.height=5, fig.width=10, fig.align='center', out.width='90%'} # Portuguese version selic_data_pt <- get_selic_rate(2000,2005, language = "pt") selic_plot_pt <- plot_selic_rate(selic_data_pt, language = "pt") print(selic_plot_pt) ```