scale_mfd {funcharts} | R Documentation |
Standardize Multivariate Functional Data.
Description
Scale multivariate functional data contained
in an object of class mfd
by subtracting the mean function and dividing
by the standard deviation function.
Usage
scale_mfd(mfdobj, center = TRUE, scale = TRUE)
Arguments
mfdobj |
A multivariate functional data object of class |
center |
A logical value, or a |
scale |
A logical value, or a |
Details
This function has been written to work similarly
as the function scale
for matrices.
When calculated, attributes center
and scale
are of class fd
and have the same structure you get
when you use fda::mean.fd
and fda::sd.fd
.
Value
A standardized object of class mfd
, with two attributes,
if calculated,
center
and scale
, storing the mean and
standard deviation functions used for standardization.
Examples
library(funcharts)
mfdobj <- data_sim_mfd()
mfdobj_scaled <- scale_mfd(mfdobj)