Learn R Programming

ichimoku (version 1.5.5)

xts_df: Convert xts to data.frame

Description

An optimised 'xts' to 'data.frame' constructor.

Usage

xts_df(x, keep.attrs = FALSE)

Value

A ‘data.frame’ object. The ‘xts’ index is preserved as the first column with header ‘index’.

Arguments

x

an ‘xts’ object.

keep.attrs

[default FALSE] if set to TRUE, will preserve any custom attributes set on the original object.

Details

The optimised data.frame constructors are used internally within the package and made available as utilities. Please note that no data validation or checking is performed.

Examples

Run this code
cloud <- ichimoku(sample_ohlc_data)
df <- xts_df(cloud)
str(df)

df2 <- xts_df(cloud, keep.attrs = TRUE)
str(df2)

Run the code above in your browser using DataLab