View source: R/multivariate_process_timeseries.R
multivariate_process_timeseries | R Documentation |
Processes raw data in such a way that it can be directly inputted to the multivariate_rythm_analysis function.
multivariate_process_timeseries(df = NULL, sampling_rate = NULL, window_size_in_days = 3, window_step_in_days = 1, smooth_data = TRUE, detrend_data = FALSE)
df |
(required) A data.frame where the first column is a POSIXct object and the rest are independent measurement values. |
sampling_rate |
(required) A character string indicating the sampling rate of the data. Examples: '30 minutes', '1 hour', '4 seconds', '100 days'. |
window_size_in_days |
(default=3) a numeric indicating the width of the window size in day units. |
window_step_in_days |
(default=1) a numeric indicating the amount of day by which to move the window in day units. |
detrend_data |
Logical. If TRUE (default) will detrend the data. If FALSE measurement values won't be detrended. If both, detrend_data and smooth_data are TRUE, the detrending will run over the smoothed data. |
butterworth |
Logical. If TRUE (default) will apply a butterworth filter to the measurement values using a moving average. If FALSE measurement values won't be filtered. |
f_low |
Frequency for the low pass filter. Default = 1/4. |
f_high |
Frequency for the high pass filter. Default = 1/72. |
order |
filter order. Default = 2. |
smoothing_n |
A numeric which indicated the amount of bins over which to run the smoothing average. Default = 4. |
plot |
logical. If TRUE (default) plots the filtered data over the raw data. If FALSE, does not plot. |
movavg |
Logical. If TRUE will smooth the measurement values useing a moving average. If FALSE (default) measurement values won't be smoothed. |
A named list of data.frames containing the output of [process_timeseries()] for each measurement value.
processed_data <- multivariate_process_timeseries(df = raw_data,
sampling_rate = "30 min", window_size_in_days = 3,
window_step_in_days = 1, smooth_data = TRUE,
detrend_data = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.