sub-.fts: Indexing into Functional Time Series

Description Usage Arguments Value Note See Also Examples

Description

A method that lets you index into a functional time series (fts).

Usage

1
2
## S3 method for class 'fts'
Y[i = "index"]

Arguments

Y

an object of class fts

i

index

Value

an object of class fts

Note

can use ':' as an operator to specify a range of indices

See Also

fts

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
require(fda)
require(Rfssa)
data(Callcenter) # Read data
u=seq(0,1,length.out=240) # Define domain of functional data
d=12 # number of basis elements
basis=create.bspline.basis(rangeval = c(0,1),nbasis = d) # create basis object
smooth.calls=smooth.basis(u, matrix(nrow=240,ncol=365,Callcenter$calls), basis)
Y=fts(smooth.calls$fd) # create functional time series
Yind=Y[4:8] # take only the 4th through 8th functions
plot(Yind)
Yminus=Y[4:8]-Y[14:18] # subtract functions from each other
plot(Yminus)

## End(Not run)

Rfssa documentation built on Sept. 13, 2019, 1:05 a.m.