Counting Species Abundances

Share:

Description

Takes a vector of species names and counts the abundance of each unique species.

Usage

1
count(sv = "species vector", x = "species sample vector")

Arguments

sv

A vector of species numbers or names.

x

A vector of species occurrences.

Details

This function is used within the H.sampler function.

Value

Returns a vector of species counts.

Author(s)

Matthew K. Lau

Examples

1
2
3
sv=1:10
x=c(1,1,1,1,1,2,3,3,5,5,5,6,7,8,9,10)
cbind(sv,count(sv,x))