powered by
Generic function to compute Lp norms for functional data objects. Works with both regular fdata and irregular irregFdata objects.
fdata
irregFdata
norm(x, p = 2, ...)# S3 method for fdata norm(x, p = 2, ...)# S3 method for irregFdata norm(x, p = 2, ...)
# S3 method for fdata norm(x, p = 2, ...)
# S3 method for irregFdata norm(x, p = 2, ...)
A numeric vector of norms, one per curve.
A functional data object (fdata or irregFdata).
The order of the norm (default 2 for L2 norm).
Additional arguments passed to methods.
# Regular fdata fd <- fdata(matrix(rnorm(100), 10, 10)) norms <- norm(fd) # Irregular fdata ifd <- sparsify(fd, minObs = 3, maxObs = 7, seed = 42) norms_irreg <- norm(ifd)
Run the code above in your browser using DataLab