as.data.frame.ichimoku: Convert ichimoku to data.frame

View source: R/methods.R

as.data.frame.ichimokuR 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, ...)

Arguments

x

an object of class 'ichimoku'.

row.names

not used.

optional

not used.

keep.attrs

(optional) 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)


ichimoku documentation built on May 23, 2022, 9:05 a.m.