process_zeros: process_zeros

View source: R/func_process_zeros.R

process_zerosR Documentation

process_zeros

Description

Calculates the result of function f, default median, over a series of state changes of equal length, determined by rle

Usage

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,
  ...
)

Arguments

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


willdrysdale/wsdmiscr documentation built on Aug. 26, 2023, 12:31 a.m.