hz_to_taxpartsize | R Documentation |
This function aggregates information in the horizon table and allocates it to the particle size class for the control section.
hz_to_taxpartsize(
x,
y,
taxpartsize = "taxpartsize",
clay = "clay",
idcol = "id",
depthcols = c("top", "bottom")
)
x |
a |
y |
a |
taxpartsize |
|
clay |
|
idcol |
character: column name of the pedon ID within the object. |
depthcols |
a character vector of length 2 specifying the names of the horizon depths (e.g. |
This function differs from texture_to_taxpartsize
in that is aggregates the results of texture_to_taxpartsize
, and accounts for strongly contrasting particle size classes.
A data.frame
object containing the original idcol, the aggregated particle size control section allocation, and an aniso column to indicate more than one contrasting class.
Stephen Roecker
texture_to_taxpartsize()
, lookup_taxpartsize()
h <- data.frame(
id = 1,
hzname = c("A", "BA", "Bw", "BC", "C"),
top = c(0, 10, 45, 60, 90),
bottom = c(10, 45, 60, 90, 150),
clay = c(15, 16, 45, 20, 10),
sand = c(10, 35, 40, 50, 90),
frags = c(0, 5, 10, 38, 40)
)
h <- cbind(h,
texcl = ssc_to_texcl(clay = h$clay, sand = h$sand))
pscs <- data.frame(id = 1,
top = 25,
bottom = 100)
h <- cbind(h,
taxpartsize = texture_to_taxpartsize(
texcl = h$texcl,
clay = h$clay,
sand = h$sand,
fragvoltot = h$frags
))
depths(h) <- id ~ top + bottom
# set required metadata for estimatePSCS()
hzdesgnname(h) <- "hzname"
hztexclname(h) <- "texcl"
hzmetaname(h, "clay") <- "clay"
pscs <- data.frame(id = h$id, rbind(estimatePSCS(h)))
names(pscs)[2:3] <- c("top", "bottom")
hz_to_taxpartsize(horizons(h), pscs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.