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

Description Usage Arguments Details Value Examples

Description

Functions operate on columns of a big.matrix object

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
colmin(x, cols = NULL, na.rm = FALSE)

## S4 method for signature 'big.matrix'
colmin(x, cols = NULL, na.rm = FALSE)

## S4 method for signature 'big.matrix'
min(x, ..., na.rm = FALSE)

colmax(x, cols = NULL, na.rm = FALSE)

## S4 method for signature 'big.matrix'
colmax(x, cols = NULL, na.rm = FALSE)

## S4 method for signature 'big.matrix'
max(x, ..., na.rm = FALSE)

colprod(x, cols = NULL, na.rm = FALSE)

## S4 method for signature 'big.matrix'
colprod(x, cols = NULL, na.rm = FALSE)

## S4 method for signature 'big.matrix'
prod(x, ..., na.rm = FALSE)

colsum(x, cols = NULL, na.rm = FALSE)

## S4 method for signature 'big.matrix'
colsum(x, cols = NULL, na.rm = FALSE)

## S4 method for signature 'big.matrix'
sum(x, ..., na.rm = FALSE)

colrange(x, cols = NULL, na.rm = FALSE)

## S4 method for signature 'big.matrix'
colrange(x, cols = NULL, na.rm = FALSE)

## S4 method for signature 'big.matrix'
range(x, ..., na.rm = FALSE)

colmean(x, cols = NULL, na.rm = FALSE)

## S4 method for signature 'big.matrix'
colmean(x, cols = NULL, na.rm = FALSE)

## S4 method for signature 'big.matrix'
mean(x, ...)

colvar(x, cols = NULL, na.rm = FALSE)

## S4 method for signature 'big.matrix'
colvar(x, cols = NULL, na.rm = FALSE)

colsd(x, cols = NULL, na.rm = FALSE)

## S4 method for signature 'big.matrix'
colsd(x, cols = NULL, na.rm = FALSE)

colna(x, cols = NULL)

## S4 method for signature 'big.matrix'
colna(x, cols = NULL)

## S4 method for signature 'big.matrix'
summary(object)

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.

object

a big.matrix object.

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).

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)

Example output

Loading required package: bigmemory
Loading required package: foreach
Loading required package: biglm
Loading required package: DBI
      a b c  d
[1,]  7 2 4  9
[2,]  2 8 9  2
[3,]  6 5 7 10
[4,] 10 9 5  6
[5,]  8 1 4  9
[1] 6.15
  a   b   c   d 
6.6 5.0 5.8 7.2 
a b c d 
2 1 4 2 
a 
2 
 a  b  c  d 
10  9  9 10 
b 
9 
       a        b        c        d 
2.966479 3.535534 2.167948 3.271085 
  min max
a   2  10
b   1   9
c   4   9
d   2  10
[1]  1 10
 a  b  c  d 
33 25 29 36 
   a    b    c    d 
6720  720 5040 9720 

biganalytics documentation built on July 8, 2020, 5:07 p.m.