A convenience feature extraction function that converts a given time series in to frequency spectrum and computes energy in each 0.5Hz band from 0 to 25 Hz.

frequency_domain_energy(values, sampling_rate = NA)

Arguments

values

A numeric vector.

sampling_rate

Sampling_rate of values. If NA it uses default sampling rate of 100Hz.

Value

A features data frame of dimension 1 x 48, each representing energy within a 0.5Hz band. See the feature definition vignette: vignette("feature_definitions", package="mhealthtools")

Examples

frequency_energy_features = frequency_domain_energy( accelerometer_data$x, sampling_rate = 100.122)