austraits.build icon indicating copy to clipboard operation
austraits.build copied to clipboard

Adding example use cases to a vignette/website somewhere

Open wcornwell opened this issue 2 years ago • 0 comments

for example for plant height we're using currently

library(austraits) 
library(tidyverse)
austraits <- load_austraits(version = "4.1.0", path = "austraits")

#all field adult records
(austraits %>% join_all)$traits %>%
  filter(taxon_name %in% c("Acacia longifolia","Acacia suaveolens")) %>%
  filter(trait_name == "plant_height") %>%
  filter(life_stage=="adult" & 
           basis_of_record %in% c("field","literature","literature, field","preserved_specimen") & #perserved specimen is flora data
           value_type=="maximum") -> acacia_heights

and leaf size

(austraits %>% join_all)$traits  %>%
  left_join (austraits$taxa) %>%
  filter (genus %in% c("Eucalyptus","Angophora","Corymbia")) %>%
  filter (trait_name == "leaf_area") %>%
  filter (life_stage=="adult" & basis_of_record %in% c("field","literature, field")) -> leaf_areas

just want to keep this somewhere i can find it next time i need it...

wcornwell avatar Feb 09 '23 06:02 wcornwell