Learn R Programming

spam (version 2.11-0)

rowSums: Form Row and Column Sums and Means

Description

Form row and column sums and means for sparse spam matrices

Usage

rowSums(x, na.rm = FALSE, dims = 1, ...)
colSums(x, na.rm = FALSE, dims = 1, ...)
rowMeans(x, na.rm = FALSE, dims = 1, ...)
colMeans(x, na.rm = FALSE, dims = 1, ...)

Value

Vector of appropriate length.

Arguments

x

a spam object

na.rm

currently ignored

dims

ignored as we have only two dimensions.

...

potentially further arguments from other methods.

Author

Reinhard Furrer

Details

Depending on the flag .

See Also

apply.spam, spam.options.

Examples

Run this code
x <- spam( rnorm(20), 5, 4)
rowSums( x)
c( x %*% rep(1,4))

Run the code above in your browser using DataLab