View source: R/smooth_detrend_by_windows.R
smooth_detrend_by_windows | R Documentation |
Smooth and/or Detrend Data by Windows
smooth_detrend_by_windows(df = NULL, smooth_data = TRUE, detrend_data = TRUE, windows = NULL, values = NULL)
df |
a data.frame with 2 columns. The first column must be the windows. The second column the values to process. |
smooth_data |
Logical. If TRUE (default) will smooth the measurement values useing a moving average. If FALSE measurement values won't be smoothed. |
binning_n |
A numeric which indicated the amount of bins over which to run the smoothing average. Default = 4. |
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. |
windows |
Optional if a data.frame is supplied. A vector with the windows. |
values |
Optional if a data.frame is supplied. A vector of values from a mesurement. |
A data.frame conatining: /n
window A vector with the windows. /n values The raw measurement values. /n smoothed A column with the smoothed data. /n detrended A column with the detrended data. /n smoothed_and_detrended A column with data that's been both smoothed and detrended.
smoothed_data <- smooth_detrend_by_windows(df = windowed_data, smooth_data = TRUE, detrend_data = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.