sampling_rate | R Documentation |
sampling_rate
estimates the sampling rate based on the average time
intervals between adjacent samples for the input multi-channel signal.
sampling_rate(df)
df |
dataframe. Input dataframe of the multi-channel signal. The first column is the timestamps in POSXlct format and the following columns are accelerometer values. |
This function accepts a dataframe of multi-channel signal, computes the duration of the sequence, and gets the sampling rate by dividing the number of samples by it.
number. The estimated sampling rate in Hz.
This function is a utility function that was used in various part in the algorithm whenever we need to know the sampling rate.
Other utility functions:
clip_data()
,
cut_off_signal()
,
interpolate_signal()
,
parse_epoch_string()
,
segment_data()
,
simulate_new_data()
# Get the test data df = sample_raw_accel_data # Default sampling rate is 80Hz sampling_rate(df) # Downsample to 30Hz output = bandlimited_interp(df, 80, 30) sampling_rate(output) # Upsampling to 100Hz output = bandlimited_interp(df, 80, 100) sampling_rate(output)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.