Learn R Programming

ThreeWay (version 1.1.3)

SUM: Summary

Description

Summary of the elements of a matrix.

Usage

SUM(A)

Arguments

A
Matrix or data.frame (coerced to a matrix)

Value

A list including the following components:
row
Vector containing the sum of squares of every row
col
Vector containing the sum of squares of every column
mr
Vector containing the mean of every row
mc
Vector containing the mean of every column
minc
Vector containing the minimum of every column
maxc
Vector containing the maximum of every for column
valueMinr
Vector containing the columns corresponding to the minimum values of every row
valueMinc
Vector containing the rows corresponding to the minimum values of every column
valueMaxr
Vector containing the columns corresponding to the maximum values of every row
valueMaxc
Vector containing the rows corresponding to the maximum values of every column
ssq
Sum of squares of the matrix
cumsumr
Matrix containing the cumulative sums of every row
cumsumc
Matrix containing the cumulative sums of every column

Examples

Run this code
X <- matrix(rnorm(6*3),ncol=3)
summary <- SUM(X)

Run the code above in your browser using DataLab