index.ichimoku: Extract the Index of Ichimoku Objects

View source: R/methods.R

indexR Documentation

Extract the Index of Ichimoku Objects

Description

Method for extracting the date-time index of ichimoku objects.

Usage

## S3 method for class 'ichimoku'
index(x, subset, ...)

Arguments

x

an object of class 'ichimoku'.

subset

an integer or logical value or vector by which to subset the index.

...

arguments passed to or from other methods.

Details

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

Subsetting by specifying the 'subset' parameter subsets using the numerical values underlying the POSIXct times and results in a faster operation than usual subset operators such as '['.

Value

The date-time index of the ichimoku object as a vector of POSIXct values.

Examples

cloud <- ichimoku(sample_ohlc_data)
index(cloud)[101:110]
index(cloud, 101:110)


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