get_series {rbcb} | R Documentation |
Get the series from BCB
Description
Get the series from BCB
Usage
get_series(
code,
start_date = NULL,
end_date = NULL,
last = 0,
as = c("tibble", "xts", "ts", "data.frame", "text")
)
Arguments
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 |
Value
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.
Examples
# 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)