Learn R Programming

diverse (version 0.1.1)

balance: Balance or proportions

Description

Computes the proportions or probabilities of raw values.

Usage

balance(data, category_row = FALSE)

Arguments

data
A numeric matrix with entities $i$ in the rows and categories $j$ in the columns. Cells show the respective value (value of abundance) of entity $i$ in the category $j$. It can also be a transpose of the previous matrix, that is, a matrix with categories
category_row
A flag to indicate that categories are in the rows. The analysis assumes that the categories are in the columns of the matrix. If the categories are in the rows and the entities in the columns, then the parameter "category_row" has to be set to TRUE. The

Value

  • A matrix of entities-categories with proportions.

Examples

Run this code
balance(data=geese, category_row = TRUE)

Run the code above in your browser using DataLab