R: Column and row summary function

colIds {splus2R} | R Documentation

## Column 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)
    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)

### Arguments

`x` | rectangular input object such as a matrix or data.frame.
`dims` | if `x` has dimension higher than `2`, `dims` determines what dimensions are summarized.
`do.NULL` | logical for rowIds or colIds.
`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 estimates returned if `TRUE`.
`SumSquares` | logical, sums of squares are returned if `TRUE`.
`weights, freq` | unsupported, here for backwards compatibility.

### Value

corresponding summary by row or by column.

### See Also

See 'aggregate' package for alternative definitions of colStdevs, colVars, rowStdevs and rowVars functions.

### Examples

    ## 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)
    rowIds(x)
    rowMaxs(x)
    rowMins(x)
    rowRanges(x)

[Package splus2R version 1.3-3 Index]