
custom_scale
custom_scale.Rdcustom_scale
Usage
custom_scale(
input.matrix,
sweep.function = "/",
MARGIN = 1,
scale.factors = NULL,
allow.negatives = FALSE
)Arguments
- input.matrix
Matrix class
- sweep.function
The function passed to
sweepthat will be used to sweep out the scale factors. Defaults to'/'.- MARGIN
Whether to apply the function within each biomarker (1) or across all biomarkers in each cell (2).
- scale.factors
A vector of scale factors. Expects the same length as the axis chosen in
MARGINor a single value. Passed to thesweepargumentSTATS- allow.negatives
If
FALSE, scaling that introduces negative values will have those values corrected to zero.