Learn R Programming

easyCODA (version 0.40.2)

CLOSE: Closure of rows of compositional data matrix

Description

This function closes (or normalizes) the rows of a compositional data matrix, resulting in rows summing to 1.

Usage

CLOSE(x)

Value

The closed compositional data matrix.

Arguments

x

Compositional data matrix.

Author

Michael Greenacre

Details

Compositional data carry relative information. It is sometimes required to close the data so that each row of observations sums to 1. The function CLOSE performs the closure.

References

Greenacre, M. (2018), Compositional Data Analysis in Practice, Chapman & Hall / CRC.

Examples

Run this code
data(cups)
apply(cups, 2, sum)
cups <- CLOSE(cups)
apply(cups, 2, sum)

Run the code above in your browser using DataLab