View source: R/func_process_zeros.R
process_zeros | R Documentation |
Calculates the result of function f, default median, over a series of state changes of equal length, determined by rle
process_zeros(
df,
zero_flag = c("zero_valve_1", "zero_valve_2"),
calc_col = c("CH1_Hz", "CH2_Hz"),
out_col = c("CH1_Hz_zero", "CH2_Hz_zero"),
state_length = 15,
trim_beg = 5,
trim_end = 5,
f = median,
interp = T,
...
)
df |
dataframe containing both the flag and calc data |
zero_flag |
name(s) of columns to use as the statechange flag |
calc_col |
name(s) of columns to use as the data to calculate f from |
state_length |
length of the state, so they can be selected from the rle result |
trim_beg |
trim a number of records from the begining of the state change |
trim_end |
trim a number of records from the end of the state change |
f |
function uses to calculate the statistic. Default median |
... |
additional arguments to pass to f |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.