Learn R Programming

ICSNP (version 1.1-2)

pair.sum: Pairwise Sums

Description

Computes pairwise sums.

Usage

pair.sum(X)

Value

Matrix containing the sums.

Arguments

X

a numeric matrix.

Author

Seija Sirkia

Details

The function computes all sums of row i and row j with i < j. The function is a wrapper to a C function to do the computation quickly and does no checks concerning the input.

See Also

pair.diff, pair.prod

Examples

Run this code
X <- matrix(1:10, ncol = 2, byrow = FALSE)
pair.sum(X)

Run the code above in your browser using DataLab