.summarizeCols {wrMisc} | R Documentation |
Summarize columns of matrix (or data.frame) 'x' using apply (main)
Description
This function summarizes columns of matrix (or data.frame) 'x' using apply In case of character entries the 'median' of sorted values will be returned
Usage
.summarizeCols(
x,
me = c("median", "medianComplete", "mean", "meanComplete", "aver", "average", "min",
"max", "maxOfRef", "minOfRef", "maxAbsOfRef", "lastLi", "last", "firstComplete",
"first", "firstLi", "summary"),
nEq = FALSE,
vectAs1row = TRUE,
silent = FALSE,
debug = FALSE,
callFrom = NULL
)
Arguments
x |
data.frame matrix of data to be summarized by comlumn |
me |
(character, length=1) summarization method (eg 'min','max','mean','median', 'medianComplete' or 'meanComplete') |
nEq |
(logical) if TRUE, add additional column indicating the number of equal lines for choice (only with min or max) |
vectAs1row |
(logical) if TRUE will interprete non-matrix 'x' as matrix with 1 row (correct effect of automatic conversion when extracting 1 line) |
silent |
(logical) suppress messages |
debug |
(logical) additional messages for debugging |
callFrom |
(character) allow easier tracking of messages produced |
Value
vector with summary for each column (unless 'me=="summary"', in this case a matrix or list will be returned )
See Also
summarizeCols
Examples
m1 <- matrix(c(28,27,11,12,11,12), nrow=2, dimnames=list(1:2,c("y","x","ref")))
.summarizeCols(m1, me="median")