summary.stat: Basic statistics for "big.matrix" objects.

Description Usage Arguments Details Value Author(s) See Also Examples

Description

These functions operate on columns of a big.matrix object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
colmean(x, cols, na.rm)
colmin(x, cols, na.rm)
min(x, ..., na.rm)
colmax(x, cols, na.rm)
max(x, ..., na.rm)
colrange(x, cols, na.rm)
range(x, ..., na.rm)
colvar(x, cols, na.rm)
colsd(x, cols, na.rm)
colsum(x, cols, na.rm)
sum(x, ..., na.rm)
colprod(x, cols, na.rm)
prod(x, ..., na.rm)
colna(x, cols)

Arguments

x

a big.matrix object.

cols

a scalar or vector of column(s) to be summarized.

na.rm

if TRUE, remove NA values before summarizing.

...

options associated with the correspoding default R function

Details

These functions essentially apply summary functions to each column (or each specified column) of the big.matrix in turn.

Value

For colrange, a matrix with two columns and length(cols) rows; column 1 contains the minimum, and column 2 contains the maximum for that column. The other functions return vectors of length length(cols).

Author(s)

John W. Emerson and Michael J. Kane

See Also

bigmemory

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
x <- as.big.matrix(
  matrix( sample(1:10, 20, replace=TRUE), 5, 4, 
          dimnames=list( NULL, c("a", "b", "c", "d")) ) )
x[,]
mean(x)
colmean(x)
colmin(x)
colmin(x, 1)
colmax(x)
colmax(x, "b")
colsd(x)
colrange(x)
range(x)
colsum(x)
colprod(x)

biganalytics documentation built on May 2, 2019, 4:45 p.m.