Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

extract

Extract variables or observations


Description

Creates subsets of a fts object.

Usage

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

Arguments

data

An object of fts.

direction

In time direction or x variable direction?

timeorder

Indexes of time order.

xorder

Indexes of x variable order.

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.

Author(s)

Han Lin Shang

Examples

# ElNino is an object of class sliced functional time series.
# This function truncates the data series rowwise or columnwise.	
extract(data = ElNino_ERSST_region_1and2, direction = "time", 
	timeorder = 1980:2006) # Last 27 curves
extract(data = ElNino_ERSST_region_1and2, direction = "x", 
	xorder = 1:8) # First 8 x variables

ftsa

Functional Time Series Analysis

v6.0
GPL-3
Authors
Rob Hyndman [aut] (<https://orcid.org/0000-0002-2140-5352>), Han Lin Shang [aut, cre, cph] (<https://orcid.org/0000-0003-1769-6430>)
Initial release
2020-11-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.