as.data.frame.ichimoku {ichimoku}R Documentation

Convert ichimoku to data.frame

Description

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

Usage

## S3 method for class 'ichimoku'
as.data.frame(x, row.names, optional, keep.attrs = FALSE, ...)

Arguments

x

an object of class 'ichimoku'.

row.names

not used.

optional

not used.

keep.attrs

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

...

arguments passed to or from other methods.

Details

This function is an S3 method for the generic function as.data.frame() for class 'ichimoku'. It can be invoked by calling as.data.frame(x) on an object 'x' of class 'ichimoku'.

Value

A 'data.frame' object. The ichimoku object index is preserved as the first column with header 'index'.

Examples

cloud <- ichimoku(sample_ohlc_data)
df <- as.data.frame(cloud)
str(df)

df2 <- as.data.frame(cloud, keep.attrs = TRUE)
str(df2)


[Package ichimoku version 1.5.3 Index]