# Libraries required for the following two examples
library(dplyr)
library(purrr)
# Look up the master species codes for all supported species
# the column species_id contains the master codes
fe_species_get_coding_table("master") |>
print(n = Inf)
# Display a summary table which shows the number of single species behind
# each master species code (must be 1 with no exception)
fe_species_get_coding_table("master") |>
group_by(name_eng, species_id) |> # display english names
summarise(n = n()) |>
arrange(as.numeric(species_id)) |> # just for the look of it
print(n = Inf)
# Make an fe_species_master vector from a character vector of appropriate
# codes
spec_ids <- fe_species_master(
c("pinus_002", "sorbus_002", "sorbus_002", "quercus_002", "prunus_001")
)
Run the code above in your browser using DataLab