rdb_rename_xts: Rename the xts object columns

Description Usage Arguments Value Author(s) See Also Examples

View source: R/rdb_rename_xts.R

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

1
rdb_rename_xts(x, fun = NULL, ...)

Arguments

x

xts object. The xts object returned by the function rdb_to_xts.

fun

function (default NULL). The function to apply to the column names.

...

Arguments for the function fun.

Value

A xts object.

Author(s)

Sebastien Galais

See Also

rdb, rdb_to_xts

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## 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)

rdbnomics documentation built on Oct. 26, 2020, 1:06 a.m.