Adds column with dates to the first position to after conversion to tibble.

nbp_xts2tbl(x)

Arguments

x

xts object.

Value

tbl_df object.

Examples

x = nbp_interest_rates() tail(nbp_xts2tbl(x))
#> # A tibble: 6 x 5 #> date ref lom dep red #> <date> <dbl> <dbl> <dbl> <dbl> #> 1 2013-03-07 0.0325 0.0475 0.0175 0.0350 #> 2 2013-05-09 0.0300 0.0450 0.0150 0.0325 #> 3 2013-06-06 0.0275 0.0425 0.0125 0.0300 #> 4 2013-07-04 0.0250 0.0400 0.0100 0.0275 #> 5 2014-10-09 0.0200 0.0300 0.0100 0.0225 #> 6 2015-03-05 0.0150 0.0250 0.00500 0.0175
dx = nbp_expand_daily(x) tail(nbp_xts2tbl(dx))
#> # A tibble: 6 x 5 #> date ref lom dep red #> <date> <dbl> <dbl> <dbl> <dbl> #> 1 2018-06-13 0.0150 0.0250 0.00500 0.0175 #> 2 2018-06-14 0.0150 0.0250 0.00500 0.0175 #> 3 2018-06-15 0.0150 0.0250 0.00500 0.0175 #> 4 2018-06-16 0.0150 0.0250 0.00500 0.0175 #> 5 2018-06-17 0.0150 0.0250 0.00500 0.0175 #> 6 2018-06-18 0.0150 0.0250 0.00500 0.0175