dataf2rawfd: Transform a 'dataf' Object to Raw Functional Data

View source: R/depth.fd.R

dataf2rawfdR Documentation

Transform a dataf Object to Raw Functional Data


From a (possibly multivariate) functional data object dataf constructs an array of the functional values evaluated at an equi-distant grid of points.


dataf2rawfd(dataf, range = NULL, d = 101)



Functions to be transformed, represented by a (possibly multivariate) dataf object of their arguments and functional values. m stands for the number of functions. The grid of observation points for the functions in dataf may not be the same.


The common range of the domain where the functions dataf are observed. Vector of length 2 with the left and the right end of the interval. Must contain all arguments given in dataf. If the range is not provided, the smallest interval in which all the arguments from the data functions are contained is chosen as the domain.


Grid size to which all the functional data are transformed. All functional observations are transformed into vectors of their functional values of length d corresponding to equi-spaced points in the domain given by the interval range. Functional values in these points are reconstructed using linear interpolation, and extrapolation, see Nagy et al. (2016).


If the functional data are univariate (scalar-valued), a matrix of size m*d is given, with each row corresponding to one function. If the functional data are k-variate with k>1, an array of size m*d*k of the functional values is given.


Stanislav Nagy,

See Also





## transform a matrix into a functional data set and back
n = 5
d = 21
X = matrix(rnorm(n*d),ncol=d)
R = rawfd2dataf(X,range=c(0,1))
R2 = dataf2rawfd(R,range=c(0,1),d=d)

## transform a functional dataset into a raw matrix of functional values
dataf = dataf.population()$dataf

## transform an array into a multivariate functional data set and back
k = 3
X = array(rnorm(n*d*k),dim=c(n,d,k))
R = rawfd2dataf(X,range=c(-1,1))

ddalpha documentation built on May 29, 2024, 1:12 a.m.