# NOT RUN {
if(requireNamespace("curl") &
curl::has_internet() &
require(aqp) &
require(soilDB)
) {
# soils of interest
s.list <- c('musick', 'cecil', 'drummer', 'amador', 'pentz', 'reiff',
'san joaquin','montpellier','grangeville','pollasky','ramona')
# fetch and convert data into an SPC
h <- fetchOSD(s.list)
# plot dendrogram + profiles
SoilTaxonomyDendrogram(h)
# again, this time save the pair-wise dissimilarity matrix
# note that there isn't a lot of discrimination between soils
(d <- SoilTaxonomyDendrogram(h))
# a different set
soils <- c('cecil', 'altavista', 'lloyd', 'wickham', 'wilkes',
'chewacla', 'congaree')
# get morphology + extended summaries for sorting of dendrogram
s <- fetchOSD(soils, extended = TRUE)
# get summary and ignore the figure
res <- vizHillslopePosition(s$hillpos)
# compare default sorting to soils sorting according to catenary, e.g.
# hillslope position
par(mar=c(0,0,1,1), mfrow=c(2,1))
SoilTaxonomyDendrogram(s$SPC, width=0.25)
mtext('default sorting', side = 2, line=-1, font=3, cex=1.25)
SoilTaxonomyDendrogram(s$SPC, rotationOrder = res$order, width=0.25)
mtext('approx. catenary sorting', side = 2, line=-1, font=3, cex=1.25)
}
# }
Run the code above in your browser using DataLab