Learn R Programming

ftsa (version 3.2)

extract: Extract variables or observations

Description

Creates subsets of a fts object.

Usage

extract(data, direction = c("time", "x"), timeorder, xorder)

Arguments

Value

When xorder is specified, it returns a fts object with same argument as data but with a subset of x variables. When timeorder is specified, it returns a fts object with same argument as data but with a subset of time variables.

Examples

Run this code
extract(ElNino, direction = "time", timeorder = 1980:2006) # Last 27 curves
extract(ElNino, direction = "x", xorder = 1:8) # First 8 x variables

Run the code above in your browser using DataLab