BETSget {BETS} | R Documentation |
Get a complete time series from a BETS database
Description
Extracts a complete time series from either the Central Bank of Brazil (BCB), the Brazilian Institute of Geography and Statistics (IBGE) or the Brazilian Institute of Economics (FGV/IBRE).
Usage
BETSget(code, from = "", to = "", data.frame = FALSE, frequency = NULL)
Arguments
code |
A |
from |
A |
to |
A |
data.frame |
A |
frequency |
An |
Value
A ts
(time series) object containing the desired series.
Note
Due to the significant size of the databases, it could take a while to retrieve the values. However, it shouldn't take more than 90 seconds.
See Also
ts
, BETSsearch
and seas
Examples
# Anual series: GDP at constant prices, in R$ (brazilian reais)
#BETSget(1208)
# International reserves - Cash concept
#int.reserves <- get("3543")
#plot(int.reserves)
# Exchange rate - Free - United States dollar (purchase)
#us.brl <- get(3691)
# Multiple requests
# BETSget(code = c(10777,4447),from = "2001-01-01", to = "2016-10-31")
# BETSget(code = c(10777,4447),from = c("2001-10-31",""),to = c("2016-10-31",""))
# f <- c("2001-10-31","1998-09-01")
# t <- c("2014-10-31","2015-01-01")
# BETSget(code = c(10777,4447), from = f, to = t)
# BETSget(code = c(10777,4447),from = "2001-10-31", to = c("2014-10-31","2015-01-01"))
# BETSget(code = c(10777,4447),from = c("2002-10-31","1997-01-01"), to = "2015-01-01")