Learn R Programming

splus2R (version 1.0-1)

colIds: Coumn and row summary function

Description

Summarizes the columns or rows of a rectangular object.

Usage

colIds(x, do.NULL=TRUE, prefix="col")
colMaxs(x, na.rm = FALSE, dims = 1, n = NULL)
colMedians(x, na.rm=FALSE)
colMins(x, na.rm = FALSE, dims = 1, n = NULL)
colRanges(x, na.rm = FALSE, dims = 1, n = NULL)
colStdevs(x, ...)
colVars(x, na.rm = FALSE, dims = 1, unbiased = TRUE,
    SumSquares = FALSE, weights = NULL, freq = NULL, n = NULL)
rowIds(x, do.NULL=TRUE, prefix="row")
rowMaxs(x, na.rm = FALSE, dims = 1, n = NULL)
rowMins(x, na.rm = FALSE, dims = 1, n = NULL)
rowRanges(x, na.rm = FALSE, dims = 1, n = NULL)
rowStdevs(x, ...)
rowVars(x, na.rm = FALSE, dims = 1, unbiased = TRUE,
    SumSquares = FALSE, weights = NULL, freq = NULL, n = NULL)

Arguments

x
rectangular input object such as a matrix or data.frame.
...
optional arguments for colStdevs function.
SumSquares
if TRUE, then unbiased is ignored and unnormalized sums of squares are returned.
dims
if x has dimension higher than 2, dims determines what dimensions are summarized.
do.NULL
logical for rowIds or colIds.
freq
vector of positive integers, the same number of observations as x. If present, the kth row of x is repeated k times. The effect is similar to the weights argument, except this does not cause the unbia
n
number of rows; treat x as a matrix with n rows.
na.rm
logical, NA values are removed if TRUE.
prefix
character string preface for column IDs returned by rowIds or colIds.
unbiased
logical, unbiased variance is returned if TRUE.
weights
vector, with the same number of observations as x. If present, argument unbiased is ignored and the definition used is sum(weights * (x-mean(x, weights=weights))$\mbox{\textasciicircum}$2) if SumSquares=TRUE and s

Value

  • corresponding summary by row or by column.

concept

splus

See Also

anyMissing, as.rectangular, deparseText, ifelse1, is.numeric.atomic.vector, is.rectangular, is.missing, is.zero, lowerCase, oldUnclass, numCols, numRows, peaks, positions, rowIds, rmvnorm, stdev, subscript2d, upperCase, vecnorm, which.na.

Examples

Run this code
## create a matrix, add dimensions, and obtain 
## various summaries 
x <- matrix(sin(1:20), nrow=4)
dimnames(x) <- list(c("a","b","c","d"), paste("col", 1:5))
colIds(x)
colMaxs(x)
colMedians(x)
colMins(x)
colRanges(x)
colStdevs(x)
colVars(x)
rowIds(x)
rowMaxs(x)
rowMins(x)
rowRanges(x)
rowStdevs(x)
rowVars(x)

Run the code above in your browser using DataLab