Count Number of Species for Each Trait
Source:R/fb_count_species_by_trait.R
fb_count_species_by_trait.Rd
For each trait computes the percentage of species without NA
(missing
trait values).
Value
A three-column data.frame
with:
trait
: the name of the trait;n_species
: the number of species with non-missing value for the trait;coverage
: the percentage of species with non-missing value for the trait.
Examples
library("funbiogeo")
data("species_traits")
species_coverage_by_trait <- fb_count_species_by_trait(species_traits)
head(species_coverage_by_trait)
#> trait n_species coverage
#> 1 adult_body_mass 123 0.8255034
#> 2 litter_size 114 0.7651007
#> 3 gestation_length 88 0.5906040
#> 4 sexual_maturity_age 84 0.5637584
#> 5 diet_breadth 83 0.5570470
#> 6 max_longevity 81 0.5436242