Learn R Programming

forecastHybrid (version 5.0.19)

tsSubsetWithIndices: Subset time series with provided indices

Description

Use provided indices to subset a time series. The provided indices must be contiguous

Usage

tsSubsetWithIndices(x, indices)

Arguments

x

A time series object

indices

A contiguous vector of indices to use for subsetting

Value

A time series object appropriately subsetted using provided indices

Examples

Run this code
# NOT RUN {
tsSubsetWithIndices(AirPassengers, c(3:10))
# }

Run the code above in your browser using DataLab