Coerce functional data objects to a data.frame
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.
# 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))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.