This is a major update to {aqp} that may create some issues for code
depending on specific inputs/outputs as of {aqp} <= 1.42,
particularly those relying on slice()
, slab()
,
and profile_compare()
. As of {aqp} 2.0,
slice()
and profile_compare()
are deprecated,
but will continue to work for the rest of calendar year 2023. There are
no plans to maintain these functions beyond {aqp} 2.0. The new version
of slab()
is a drop-in replacement for the previous
version.
See the manual pages for dice()
, NCSP()
,
and slab()
. Note that these new / updated functions perform
stricter tests for horizon depth logic errors. Messages and warnings are
issued when invalid depth logic is reported by
checkHzDepthLogic()
. New functions
accumulateDepths()
, repairMissingHzDepths()
,
and fillHzGaps()
can usually salvage problematic
profiles.
The replace_na
and add_soil_flag
arguments
to profile_compare()
are not present in
NCSP()
; missing data are always replaced by maximum
dissimilarity (1 when Gower’s distance metric is used) and the
soil/non-soil matrix is always used to compare profiles of different
depth.
Notable Changes
- Deprecation of
slice()
in favor of the new, faster, more robust implementation viadice()
. Be sure to update existing code to usedice()
from now on. Some argument names have changed. - Complete overhaul of
slab()
(thanks to @brownag), with new arguments, faster back-end, and weighted aggregation implemented (finally). - Deprecation of
profile_compare()
in favor of the newNCSP()
function–a complete overhaul based on Maynard et al., 2020. Note that:- site level attributes are now handled by
compareSites()
- variable weights are specified by argument
- site level attributes are now handled by
- The functions
perturb()
andestimatePSCS()
are now vectorized, and optimized for largerSoilProfileCollection
objects. -
mixMunsell()
now usesmixingMethod = 'exact'
by default for the simulation of subtractive color mixtures -
gower
package moved to SUGGESTS -
plotColorMixture()
now using grid graphics functions to determine color swatch geometry and setting overlap detection threshold - Deprecation of
rgb2munsell()
in favor of the more generalcol2Munsell()
- Removal of
PMS2Munsell()
and support data - Deprecation of
coordinates()<-
andproj4string()<-
in favor ofinitSpatial()<-
- Removal of
rruff.sample
example XRD patterns -
get.ml.hz()
no longer uses thename
argument
Major changes to plotSPC()
- The maximum depth range of the figure is now based on
max.depth
ormax(x)
. This means that sketches generated with {aqp} 2.x will generally have less white space at the bottom of the figure. Make more room for additional annotation or visual effect by setting the desired depth range with themax.depth
argument. - Now using the
electroStatics_1D()
method for fixing horizon depth label overlap, solutions are deterministic and almost always better. Adjust label overlap adjustment strategy withfixOverlapArgs = list(...)
. - Better depth axis interval heuristics (if not specified), varying based on figure depth range.
- Depth axis adjustments via new argument
depth.axis
, logical or list - deprecation of arguments:
-
plot.depth.axis
: set viadepth.axis = TRUE
,depth.axis = FALSE
, or customizedepth.axis = list(...)
-
cex.depth.axis
: set viadepth.axis = list(cex = 1)
-
axis.line.offset
: set viadepth.axis = list(line = -2)
-
New Features
- New example data,
wilson2022
. - Fast prototyping of
SoilProfileCollection
objects viaquickSPC()
and list / character templates. - Re-use arguments to
plotSPC()
via settingoptions(.aqp.plotSPC.args = list(...))
. Set tooptions(.aqp.plotSPC.args = NULL)
to disable. - Coarse fragment classification via
fragmentSieve()
andfragmentClasses()
. - S4
as.data.frame(<SPC>)
as shorthand foras(<SPC>, 'data.frame')
-
plotSPC()
now marks truncated profiles with a ragged bottom. -
fixOverlap()
now has two label-placement solvers:- electrostatic simulation (
method = "E"
) - simulated annealing (
method = "S"
)
- electrostatic simulation (
- New depth axis
styles in
plotSPC()
. - New function
flagOverlappingHz()
for identifying horizons with perfect overlap - New function
warpHorizons()
for warping horizon thickness (inflate/deflate) -
simulateColor()
adds multivariate simulation in CIELAB colorspace
Incremental changes, should have no effect on previous code
- Bug fix in
plotSPC()
whenfixLabelCollisions = TRUE
, adjustments suggested tofixOverlap()
are now scaled correctly. -
explainPlotSPC()
reports label adjustment index when label collision repair is enabled. - Aesthetic cleanup in
explainPlotSPC()
. -
soilColorSignature()
gains arguments and perceptual color distances (dE00) via {farver} package. -
as(<SPC>, "data.frame")
: Replaceplyr::join()
withmerge()
. -
correctAWC()
: NA handling - return NA when frags are NA. -
mutate_profile()
: Faster (data.table-based) evaluation of profile-level expressions. -
profileApply
: Add support for customlapply()
-like function (APPLY.FUN
) for processing chunks. - Add
.interpretHorizonColor()
outputs tolast_spc_plot
inaqp.env
for use in customlegend()
. - Add
simplify
argument toSoilTextureLevels()
andssc_to_texcl()
to optionally convert to an ordered factor with maximum of 12 levels (rather than 21). This smaller list of classes excludes sand grain size variants such as fine sand, loamy coarse sand, and very fine sandy loam. - Major updates to
profileInformationIndex()
methods and performance boost. - Enhancements to
evalMissingData()
.