Learn R Programming

ichimoku (version 1.5.5)

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

Description

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

Usage

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

Value

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

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’.

Examples

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

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

Run the code above in your browser using DataLab