Simplify multiple Munsell color observations associated with each horizon.
simplifyColorData(d, id.var = "phiid", wt = "colorpct", bt = FALSE)
character vector with the name of the column containing an ID
that is unique among all horizons in
a character vector with the name of the column containing color weights for mixing
logical, should the mixed sRGB representation of soil color be
transformed to closest Munsell chips? This is performed by
This function is mainly intended for the processing of NASIS pedon/horizon
data which may or may not contain multiple colors per horizon/moisture
simplifyColorData will "mix" multiple colors
associated with horizons in
d, according to IDs specified by
id.var, using "weights" (area percentages) specified by the
Note that this function doesn't actually simulate the mixture of pigments on a surface, rather, "mixing" is approximated via weighted average in the CIELAB colorspace.
simplifyColorData function can be applied to data sources other
than NASIS by careful use of the
d must contain Munsell colors split into columns named
"colorhue", "colorvalue", and "colorchroma". In addition, the moisture state
("Dry" or "Moist") must be specified in a column named "colormoistst".
mix_and_clean_colors function can be applied to arbitrary data
sources as long as
x contains sRGB coordinates in columns named "r",
"g", and "b". This function should be applied to chunks of rows within which
color mixtures make sense.