powered by
Form row and column sums and means for sparse spam matrices
spam
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, ...)
Vector of appropriate length.
a spam object
currently ignored
ignored as we have only two dimensions.
potentially further arguments from other methods.
Reinhard Furrer
Depending on the flag .
apply.spam, spam.options.
apply.spam
spam.options
x <- spam( rnorm(20), 5, 4) rowSums( x) c( x %*% rep(1,4))
Run the code above in your browser using DataLab