as_tibble.ichimoku: Convert ichimoku to tibble

View source: R/methods.R

as_tibbleR Documentation

Convert ichimoku to tibble

Description

An optimised 'ichimoku' to 'tibble' constructor.

Usage

## S3 method for class 'ichimoku'
as_tibble(x, class, keep.attrs, ...)

Arguments

x

an object of class 'ichimoku'.

class

(optional) as a character vector, subclasses to assign to the new object.

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_tibble() for class 'ichimoku'. It can be invoked by calling as_tibble(x) on an object 'x' of class 'ichimoku'.

Value

A 'tibble' with S3 classes of 'tbl_df', 'tbl' and 'data.frame'. The ichimoku object index is preserved as the first column with header 'index'.

Examples

cloud <- ichimoku(sample_ohlc_data)
tbl <- as_tibble(cloud)
str(tbl)

tbl2 <- as_tibble(cloud, keep.attrs = TRUE)
str(tbl2)


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