extract {ftsa} | R Documentation |
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 |
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
[Package ftsa version 6.4 Index]