Learn R Programming

benthos (version 1.3-8)

genus_to_species: Genus to Species Conversion

Description

This alorithm reallocates the counts of taxa, that are only indentified at the genus level to taxa in the same sampling unit and of the same genus but that are identified on the species level. The redistribution of counts is proportional to the number of counts at the species level.

Usage

genus_to_species(is_genus, count)

Value

numeric vector with updated counts. The counts for the taxon on the genus level have been set to zero.

Arguments

is_genus

logical vector with elements TRUE if the corresponding taxon is on the genus level, and FALSE if it is on the species level.

count

numeric vector with elements giving the counts of each corresponding taxon.

Examples

Run this code
     genus_to_species(is_genus = c(TRUE, FALSE, FALSE), count = c(3, 10, 20))
     genus_to_species(is_genus = c(TRUE, FALSE, FALSE), count = c(1, 10, 20))

Run the code above in your browser using DataLab