Normalize Samples
normalizeSmp.Rd
Calculate sample concentration based on the fit of standard dilutions.
Usage
normalizeSmp(
smp,
smpvar,
resvar,
dilvar,
FUNinv,
par,
bounds,
fitflag,
fitlog,
trim.flat = TRUE,
extrapolate.low = FALSE,
extrapolate.up = FALSE
)
Arguments
- smp
data frame containing samples
- smpvar
character string indicating sample variable.
- dilvar, resvar
character strings for dilution variable and results.
- FUNinv
inverse function to infer sample concentration
- par
values of model function parameters
- bounds
named vector with values for extrema and bounds indicating "flat" regions of the curve
- fitflag
flag for the fit as returned by
fitStd
- fitlog
character string indicating if standard values should be log-transformed for fitting. If the string contains _x_,
xvar
will be transformed, if it contains _y_ -yvar
.- trim.flat
logical value determining how the values of
yvar
are trimmed. IfTRUE
, they will be trimmed at the bounds where the curve starts to flatten out (automatically determined as maxima of the third derivative of the function). IfFALSE
,yvar
will be trimmed at extrema, defined as the range of standards or asymptotes of the fit (whichever are less extreme).- extrapolate.low
if
TRUE
, sample values beyond lower bounds will be processed by extrapolation of the standard curve (not recommended). Takes precedence overtrim.flat
value.- extrapolate.up
if
TRUE
, sample values beyond upper bounds will be processed by extrapolation of the standard curve (not recommended). Takes precedence overtrim.flat
value.