preprocess: preprocess raw growth-curve measures

Description Usage Arguments Value Examples

View source: R/preprocess.R

Description

preprocess raw growth-curve measures

Usage

1
2
3
preprocess(y, log_base = exp(1), runmed_k = 3, runmav_n = 5,
  force_inc = TRUE, bg_subtract = function(y) y - min(y),
  calibrate_fxn = function(y) y)

Arguments

y

<num> numeric vector of values to preprocess

log_base

<num>|<lgl> base of log for log(y / min(y)) transformation. Defaults to base [exp(1)]. set to NA or FALSE to skip.

runmed_k

integer width of median window, must be odd. Passed to stats::runmed(). Defaults to 3. set to NA or FALSE to skip.

runmav_n

integer width of moving average filter. Defaults to 5. set to NA or FALSE to skip.

force_inc

force y to be monotonically increasing?

bg_subtract

numeric value to use for background substraction. Defaults to min(y). set to NA or FALSE to skip.

calibrate_fxn

function to calibrate y values. Usually for correcting for non-linear scattering at higher concentrations. Defaults to the identity function I, that simply returns y un-transformed (as is).

Value

numeric vector of pre-processed values.

Examples

1
2
3
y <- c(1:10, 8,11)
preprocess(y)
preprocess(1:10, log_base = F, runmed_k = F, runmav_n = F, force_inc = F, bg_subtract = F, calibrate_fxn = F)

npjc/growr documentation built on Nov. 9, 2019, 7:29 a.m.