powered by
Convert a tidy dataframe into a list of separate time series objects like `xts` and `ts` or even a `tibble` with a time series representation ( two columns with dates and values).
sgs_untidy(x, tidydf, as = c("tibble", "xts", "ts"))
a list with time series objects
sgs object with the corresponding codes
tidy dataframe returned by `rbcb_get`
the returning type (`tibble`, `xts`, `ts`)
if (FALSE) { x <- sgs(USD = 1, SELIC = 1178) df <- rbcb_get(x, from = Sys.Date() - 10) sgs_untidy(x, df, as = "xts") }
Run the code above in your browser using DataLab