Learn R Programming

rainbow (version 1.1)

fd: Create functional objects

Description

fd is used to create functional data sets. fts is used to create functional time series.

Usage

fd(x, y, xname, yname)
fts(x, y, start = 1, frequency = 1, xname, yname)

Arguments

x
Numeric vector of length $p$.
y
Matrix of size $p\times n$ representing $n$ functions of $x$ observed at points $1,\dots,p$.
start
The time of the first observation. Either a single number or a vector of two integers, which specify a natural time unit and a (1-based) number of samples into the time unit. See ts for details.
frequency
The number of observations per unit of time.
xname
Character string giving name of x vector. (optional)
yname
Character string giving name of y vector. (optional)

Value

  • An object of class fd or fts.

Examples

Run this code
fts(x = 1:12, y = ElNino$y, xname = "Month", yname = "Sea surface temperature")

Run the code above in your browser using DataLab