Learn R Programming

ichimoku (version 1.5.5)

index: Extract the Index of Ichimoku Objects

Description

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

Usage

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

Value

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

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 ‘\[’.

Examples

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

Run the code above in your browser using DataLab