rdb_rename_xts {rdbnomics} | R Documentation |
Rename the xts object columns
Description
In the xts
object returned by the function rdb_to_xts
, the
series codes are used as column names. If you prefer the series names
(or apply a function to them), the function rdb_rename_xts
is here for
that.
Usage
rdb_rename_xts(x, fun = NULL, ...)
Arguments
x |
|
fun |
function (default NULL). The function to apply to the column names. |
... |
Arguments for the function |
Value
A xts
object.
Author(s)
Sebastien Galais
See Also
Examples
## Not run:
library(xts)
library(data.table)
library(rdbnomics)
df <- rdb("IMF", "BOP", mask = "A.FR+ES.BCA_BP6_EUR")
df <- rdb_to_xts(df)
rdb_rename_xts(df)
## End(Not run)
[Package rdbnomics version 0.6.4 Index]