forestgeo / fgeo.biomass

Calculate biomass with allometric equations from the allodb package and ForestGEO data
https://forestgeo.github.io/fgeo.biomass
GNU General Public License v3.0
8 stars 4 forks source link

Let users define an unknown species to be matched with a generic equation #32

Open maurolepore opened 5 years ago

maurolepore commented 5 years ago

(Relates to forestgeo/allodb#72)

Different sites use different way to encode unknown species. Thus users should be able to specify how this is done for their specific datasets

library(tidyverse)

scbi_species %>% 
  filter(tolower(Latin) == "unidentified unk") %>% 
  select(1:5)
#> Error in eval(lhs, parent, parent): object 'scbi_species' not found

bciex::bci_species %>% 
  filter(grepl("unident", tolower(Latin))) %>% 
  select(1:5)
#> # A tibble: 48 x 5
#>    sp     Latin                   Genus        Species    Family 
#>    <chr>  <chr>                   <chr>        <chr>      <chr>  
#>  1 lau12  Unidentified pubescente Unidentified pubescente Unknown
#>  2 un2_sh Unidentified (sherman)  Unidentified (sherman)  Unknown
#>  3 cel1   Unidentified sp.1       Unidentified sp.1       Unknown
#>  4 mal1   Unidentified sp.1       Unidentified sp.1       Unknown
#>  5 myt13  Unidentified sp.13      Unidentified sp.13      Unknown
#>  6 ann2   Unidentified sp.2       Unidentified sp.2       Unknown
#>  7 nyc2   Unidentified sp.2       Unidentified sp.2       Unknown
#>  8 rub7   Unidentified sp.7       Unidentified sp.7       Unknown
#>  9 rub8   Unidentified sp.8       Unidentified sp.8       Unknown
#> 10 uniden Unidentified species    Unidentified species    Unknown
#> # ... with 38 more rows

Created on 2019-03-27 by the reprex package (v0.2.1)