xts_df {ichimoku} | R Documentation |
Convert xts to data.frame
Description
An optimised 'xts' to 'data.frame' constructor.
Usage
xts_df(x, keep.attrs = FALSE)
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.
Value
A 'data.frame' object. The 'xts' index is preserved as the first column with header 'index'.
Examples
cloud <- ichimoku(sample_ohlc_data)
df <- xts_df(cloud)
str(df)
df2 <- xts_df(cloud, keep.attrs = TRUE)
str(df2)
[Package ichimoku version 1.5.3 Index]