I've noticed it's not super easy to get the trees put back out in a clean text-based format and that it would be good to extend on @dylanbeaudette old examples that were in the readme.
Here is a quick sample (modified version of second old example) based on 13th edition keys and an order->subgroup path string.
library(SoilTaxonomy)
library(data.tree)
data("ST_higher_taxa_codes_13th", package = "SoilTaxonomy")
# create ST-style dataset from higher taxa codes
ST13 <- getTaxonAtLevel(ST_higher_taxa_codes_13th$taxon,
level = c("order", "suborder", "greatgroup", "subgroup"))
ST13 <- ST13[order(ST_higher_taxa_codes_13th$code),]
ST13 <- ST13[complete.cases(ST13),]
ST13$root <- "Soil Taxonomy (13th Edition)"
ST13$pathString <- with(ST13, paste0(root, "/", order, "/", suborder, "/", greatgroup, "/", subgroup))
n <- as.Node(ST13)
print(n, limit = NULL)
Ideas for output:
- the text output appears to include some unicode markup that should be stripped out.
- knitr::kable() and results="asis" result in less-than-ideal HTML formatting (needs fixed-width font, other styling)
I've noticed it's not super easy to get the trees put back out in a clean text-based format and that it would be good to extend on @dylanbeaudette old examples that were in the readme.
Here is a quick sample (modified version of second old example) based on 13th edition keys and an order->subgroup path string.
Ideas for output: