powered by
Scales each curve to the range \([0, 1]\) (or custom range). This preserves the shape while normalizing the range.
scale_minmax(fdataobj, min = 0, max = 1)# S3 method for fdata scale_minmax(fdataobj, min = 0, max = 1)# S3 method for irregFdata scale_minmax(fdataobj, min = 0, max = 1)
# S3 method for fdata scale_minmax(fdataobj, min = 0, max = 1)
# S3 method for irregFdata scale_minmax(fdataobj, min = 0, max = 1)
A scaled 'fdata' object where each curve is in the specified range.
An object of class 'fdata'.
Target minimum value (default 0).
Target maximum value (default 1).
fd <- fdata(matrix(rnorm(100) * 10 + 50, 10, 10), argvals = seq(0, 1, length.out = 10)) fd_scaled <- scale_minmax(fd) # Check: each curve now in [0, 1] apply(fd_scaled$data, 1, range)
Run the code above in your browser using DataLab