combfun: Sums duplicate values, for determining [species] weights

View source: R/balance.R

combfunR Documentation

Sums duplicate values, for determining [species] weights

Description

Intended for use in constructing rarity plots, this function takes a numeric vector of integers representing species abundances, and returns the weights for each, unique rarity value. This is to solve overplotting and convey the total "weight" of all species of a given rarity.

Usage

combfun(x)

Arguments

x

numeric vector

Value

A vector of weights, where only unique quantities have weights. The length of the new vector could be much shorter than length(x).

Examples

combfun(c(1, 2, 3, 3, 3, 4, 5, 9))

mikeroswell/MeanRarity documentation built on May 5, 2024, 4:50 p.m.