You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to download a species list, then getting the traits for the list automatically.
However, there is a naming inconsistency in species names between function that gets you the occurrence/ranges of species, and the functions that gets the trait data.
The former need the species name with an underscore, while the latter need the species name separated by a space:
library("BIEN")
#> Warning: le package 'BIEN' a été compilé avec la version R 4.0.3#> Le chargement a nécessité le package : RPostgreSQL#> Warning: le package 'RPostgreSQL' a été compilé avec la version R 4.0.3#> Le chargement a nécessité le package : DBI#> Warning: le package 'DBI' a été compilé avec la version R 4.0.3#> Type vignette("BIEN") or vignette("BIEN_tutorial") to get started#> # Ranges work with species names with underscores and without# But always return species names *with* underscores
BIEN_ranges_load_species("Arnica_ovata")
#> class : SpatialPolygonsDataFrame #> features : 1 #> extent : -173.2246, -104.9879, 30.87895, 67.90291 (xmin, xmax, ymin, ymax)#> crs : +proj=longlat +datum=WGS84 +no_defs #> variables : 1#> names : species #> value : Arnica_ovata
BIEN_ranges_load_species("Arnica ovata")
#> class : SpatialPolygonsDataFrame #> features : 1 #> extent : -173.2246, -104.9879, 30.87895, 67.90291 (xmin, xmax, ymin, ymax)#> crs : +proj=longlat +datum=WGS84 +no_defs #> variables : 1#> names : species #> value : Arnica_ovata# Trait functions need species *without* underscores
BIEN_trait_species("Arnica_ovata")
#> data frame with 0 columns and 0 rowstibble::as_tibble(BIEN_trait_species("Arnica ovata"))
#> # A tibble: 4 x 13#> scrubbed_specie~ trait_name trait_value unit method latitude longitude#> <chr> <chr> <chr> <chr> <chr> <dbl> <dbl>#> 1 Arnica ovata seed mass 1.357 mg data ~ NA NA#> 2 Arnica ovata whole pla~ Herb <NA> Speci~ NA NA#> 3 Arnica ovata seed mass 1.357 mg data ~ NA NA#> 4 Arnica ovata whole pla~ Herb <NA> Speci~ NA NA#> # ... with 6 more variables: elevation_m <int>, url_source <chr>,#> # project_pi <chr>, project_pi_contact <chr>, access <chr>, id <dbl>
I've been trying to download a species list, then getting the traits for the list automatically.
However, there is a naming inconsistency in species names between function that gets you the occurrence/ranges of species, and the functions that gets the trait data.
The former need the species name with an underscore, while the latter need the species name separated by a space:
Created on 2020-11-20 by the reprex package (v0.3.0)
Session info
The text was updated successfully, but these errors were encountered: