View source: R/rbcb_get_series.R
get_series | R Documentation |
Get the series from BCB
get_series(
code,
start_date = NULL,
end_date = NULL,
last = 0,
as = c("tibble", "xts", "ts", "data.frame", "text")
)
code |
series code |
start_date |
series initial date. Accepts ISO character formated date and |
end_date |
series final date. Accepts ISO character formated date and |
last |
last items of the series |
as |
the returning type: data objects (
The arguments |
tibble
is the default returning class, but the argument as
can be set
to xts
, data.frame
, ts
, or text
to return these other types.
text
returns the JSON data provided by the remote API.
# download the entire series
## Not run:
get_series(1)
## End(Not run)
# download a period of dates
## Not run:
get_series(1, start_date = "2016-12-01")
## End(Not run)
## Not run:
x <- get_series(1, start_date = "2016-12-01", end_date = "2016-12-31")
## End(Not run)
# downlaod the last register
## Not run:
x <- get_series(1, last = 1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.