Skip to contents

This function scales a `nfd` object using a provided weight or by calculating a scaling factor based on the variance of the object. The scaled `nfd` object is returned.

Usage

scale_nfd(nfd_obj, weight = NULL)

Arguments

nfd_obj

A `nfd` object to be scaled.

weight

An optional numeric value to use as the scaling factor. If NULL, the scaling factor is calculated automatically.

Value

A scaled `nfd` object.

Examples

# Example usage:
# Assuming `nfd_obj` is a valid numeric functional data object:
# scaled_nfd <- scale_nfd(nfd_obj)
# scaled_nfd <- scale_nfd(nfd_obj, weight = 0.5)