Learn R Programming

aqp (version 0.85)

sp2: Honcut Creek Soil Profile Data

Description

A collection of 18 soil profiles, consisting of select soil morphologic attributes, associated with a stratigraphic study conducted near Honcut Creek, California.

Usage

data(sp2)

Arguments

source

Busacca, Alan J.; Singer, Michael J.; Verosub, Kenneth L. 1989. Late Cenozoic stratigraphy of the Feather and Yuba rivers area, California, with a section on soil development in mixed alluvium at Honcut Creek. USGS Bulletin 1590-G.

Examples

Run this code
data(sp2)

# convert into SoilProfileList and plot
# plotting order, based on the dated surface each soil was described on
p.surface <- as.numeric(aggregate(sp2$surface, by=list(sp2$id), unique)$x)
p.order <- order(p.surface)

sp2.list <- initProfileList(sp2)
profile_plot(sp2.list, plot.order=p.order)

# truncate plot to 200 cm depth
profile_plot(sp2.list, plot.order=p.order, max.depth=200)


# look at numerical distances between profiles
d <- profile_compare(sp2, vars=c('prop','field_ph','hue','value'), max_d=100, k=0.01)

# better plotting with ape package:
require(ape)
require(cluster)
h <- diana(d)
p <- as.phylo(as.hclust(h))
plot(ladderize(p), cex=0.75, label.offset=1, no.margin=TRUE)

# add in the dated surface type via color
tiplabels(col=p.surface, pch=15)

# based on distance matrix values, YMMV
legend(x=-0.36, y=6.1, legend=levels(sp2$surface), col=1:6, pch=15, bty='n', bg='white')

Run the code above in your browser using DataLab