Plot a dendrogram based on the first 4 levels of Soil Taxonomy, with soil profiles hanging below. A dissimilarity matrix is computed using Gower's distance metric for nominal (
KST.order = FALSE) or ordinal (
KST.order = TRUE) scale variables, based on soil order, suborder, greatgroup, and subgroup taxa.
SoilTaxonomyDendrogram( spc, KST.order = TRUE, rotationOrder = NULL, name = "hzname", name.style = "center-center", id.style = "side", max.depth = max(spc), n.depth.ticks = 6, scaling.factor = 0.015, cex.names = 0.75, cex.id = 0.75, axis.line.offset = -4, width = 0.1, y.offset = 0.5, shrink = FALSE, font.id = 2, cex.taxon.labels = 0.66, dend.color = par("fg"), dend.width = 1, ... )
SoilProfileCollection object, typically returned by
logical, encode / cluster taxa via ordinal factors, based on ordering within Keys to Soil Taxonomy
character vector of profile IDs with desired ordering of leaves in the dendrogram from left to right; exact ordering is not always possible
column name containing horizon names
depth at which profiles are truncated for plotting
suggested number of ticks on the depth axis
scaling factor used to convert depth units into plotting units
character scaling for horizon names
character scaling for profile IDs
horizontal offset for depth axis
width of profiles
vertical offset between dendrogram and profiles
logical, should long horizon names be shrunk by 80% ?
font style applied to profile id, default is 2 (bold)
character scaling for taxonomic information
dendrogram line color
dendrogram line width
additional arguments to
An invisibly-returned list containing:
dist: pair-wise dissimilarity matrix
order: final ordering of
This function looks for specific site-level attributes named:
misc/soilTaxonomyDendrogram-examples.R for some examples.
rotationOrder argument uses
ape::rotateConstr() to reorder leaves within the
hclust representation of the ST hierarchy. Perfect sorting is not always possible.
# built-in data, same as results from soilDB::fetchOSD() data("OSDexamples") # examples using first 8 profiles ## TODO: uncomment once latest SoilTaxonomy is on CRAN # KST-style ordering # SoilTaxonomyDendrogram( # OSDexamples$SPC[1:8, ], width = 0.3, name.style = 'center-center', # KST.order = TRUE # ) # classic ordering, based on nominal scale variables (unordered factors) SoilTaxonomyDendrogram( OSDexamples$SPC[1:8, ], width = 0.3, name.style = 'center-center', KST.order = FALSE )