Defines a multidimensional functional data set.
Constructor function of the npf.data-class.
as.npf.data() converts functional data to a npf.data-class object.
npf.data(y, min, max, lag, ylabel, ynames, dimnames)
# S3 method for class 'npf.data'
coords(x, ...)
as.npf.data(obj, ...)
# Default S3 method
as.npf.data(obj, ...)
# S3 method for class 'array'
as.npf.data(obj, ...)
# S3 method for class 'fdata'
as.npf.data(
obj,
ylabel = NULL,
ynames = NULL,
dimnames = NULL,
tol = sqrt(.Machine$double.eps),
...
)numeric matrix or array; the last dimension corresponds to curves and the first ones to discretization points.
vector; minimum values of the discretization points (coordinates).
vector; maximum values of the discretization points (optional).
vector; lag in each dimension (optional).
character; name used to label the data.
character vector; names used to label the curves.
character vector; names used to label the dimensions.
funcional data (npf.data-class object).
further arguments passed to npf.data().
a functional data object.
numerical tolerance used to check whether the discretization points are regularly spaced
Returns an object of class npf.data
(extending npsp::data.grid), a list with
the arguments y, ylabel and ynames as components, and two additional
components:
ny number of curves (sample size).
grid a npsp::grid.par-class object that defines the
discretization points.
Only one of the arguments max or lag must be specified.
fd.ozone <- npf.data(ozone, dimnames = "day")
plot(fd.ozone)