Corrections are a special subset of functions which by default write over the elements that they recalculate.
correctInput(input = NULL, ..., data = NULL,
correction = NULL)zeroNegatives(input = NULL, ..., data = NULL,
screen = FALSE)
correctBaseline(x, ..., data = NULL, output = "ans")
#associated
calcPack2(input, ..., settings = NULL, data = NULL)
With the exception of calcPack2, all the above functions generate
input corrections.
correctBaseline returns the supplied data time-series (x) after applying the
requested baseline correction (see below).
(Required data series typically vectors) The input to use when makin a correction. This
is typically a vector or element in either a data.frame or pems object.
(For correctBaseline) (Required data series typically vectors) The input to use when makin a correction. This
is typically a vector or element in either a data.frame or pems object.
(Optional) Other arguments, typically passed on.
(Optional data.frame or pems object) The data source if either a data.frame
or pems object is being used.
(For correctInput, required function) The correction operation to apply to
input. This is typically a function or function name (as character string).
(For zeroNegatives, logical) If the user intends screening the correction before applying
it, this should be set to TRUE.
(character) Where options exists for the function output, the required output. For
correctBaseline, current options: 'ans' (the default) and
'diagnostic'.
(For calcPack2, list) Any arguments to be used as settings when handling
pems.elements. Unless developing functions, this can typically be ignored.
Karl Ropkins
correctInput is a general correction handlers. It accepts an
input and a function, correction, which it applies to
input.
zeroNegatives resets any negative values in an input to
zero.
correctBaseline attempts to correct the baseline of a supplied data
(pems.element vector) time-series. Baseline corrections are
carried out using methods from the baseline package. See Below.
calcPack2 is an alternative version of calcPack. See
associated help for details.
baseline:
Kristian Hovde Liland and Bjorn-Helge Mevik (2015). baseline: Baseline Correction of Spectra. R package version 1.2-1. https://CRAN.R-project.org/package=baseline
baseline regarding baseline corrections.
common.calculations, calcVSP or calcEm for calculation functions.
getElement (checkUnits, etc
and convertUnits for data management.
###########
##example 1
###########
#basic usage
zeroNegatives(-10:10) #etc
Run the code above in your browser using DataLab