as.data.frame.funData | R Documentation |
Coerce objects of class funData
, multiFunData
and
irregFunData
to a data frame.
## S4 method for signature 'funData'
as.data.frame(x)
## S4 method for signature 'multiFunData'
as.data.frame(x)
## S4 method for signature 'irregFunData'
as.data.frame(x)
x |
The functional data object that is to be transformed to a
|
A data frame with columns obs
(gives index/name of
observed curve), argvals1, ... argvalsd
with d
the
dimension of the support and X
for the observed values.
One-dimensional functions have only argvals1
, two-dimensional
functions (images) have argvals1
and argvals2
, etc.
funData
,
irregFunData
, multiFunData
,
data.frame
# one-dimensional domain
f1 <- funData(argvals = 1:5, X = matrix(1:20, nrow = 4))
head(as.data.frame(f1))
# two-dimensional domain
f2 <- funData(argvals = list(1:5, 1:6), X = array(1:120, c(4,5,6)))
head(as.data.frame(f2))
# multivariate functional data
m1 <- multiFunData(f1, f2)
str(as.data.frame(m1))
# irregular functional data
i1 <- irregFunData(argvals = list(1:5, 2:4, 3:5), X = list(1:5, 2:4, -(3:1)))
head(as.data.frame(i1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.