# Libraries required for the following two examples
library(dplyr)
library(purrr)
# Look up the tum_wwk_short species codes for all supported species
# the column species_id contains the tum_wwk_short codes
species_codings |>
filter(species_coding == "tum_wwk_short") |>
pluck(2, 1) |>
print(n = Inf)
# Display a summary table which shows the number of single species behind
# each tum_wwk_short species code
species_codings |>
filter(species_coding == "tum_wwk_short") |>
pluck(2, 1) |>
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_tum_wwk_short vector from a vector of integer codes
spec_ids <- fe_species_tum_wwk_short(c(1, 1, 1, 5, 5, 5, 5, 3, 3, 8, 9, 8))
Run the code above in your browser using DataLab