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.
slice()
in favor of the new, faster,
more robust implementation via dice()
. Be sure to update
existing code to use dice()
from now on. Some argument
names have changed.slab()
(thanks to @brownag), with new arguments, faster back-end,
and weighted aggregation implemented (finally).profile_compare()
in favor of the new
NCSP()
function–a complete overhaul based on Maynard et
al., 2020. Note that:
compareSites()
perturb()
and estimatePSCS()
are now vectorized, and optimized for larger
SoilProfileCollection
objects.mixMunsell()
now uses
mixingMethod = 'exact'
by default for the simulation of
subtractive color mixturesgower
package moved to SUGGESTSplotColorMixture()
now using grid graphics functions to
determine color swatch geometry and setting overlap detection
thresholdrgb2munsell()
in favor of the more
general col2Munsell()
PMS2Munsell()
and support datacoordinates()<-
and
proj4string()<-
in favor of
initSpatial()<-
rruff.sample
example XRD patternsget.ml.hz()
no longer uses the name
argumentplotSPC()
max.depth
or max(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 the
max.depth
argument.electroStatics_1D()
method for fixing
horizon depth label overlap, solutions are deterministic and almost
always better. Adjust label overlap adjustment strategy with
fixOverlapArgs = list(...)
.depth.axis
,
logical or listplot.depth.axis
: set via
depth.axis = TRUE
, depth.axis = FALSE
, or
customize depth.axis = list(...)
cex.depth.axis
: set via
depth.axis = list(cex = 1)
axis.line.offset
: set via
depth.axis = list(line = -2)
wilson2022
.SoilProfileCollection
objects via
quickSPC()
and list / character templates.plotSPC()
via setting
options(.aqp.plotSPC.args = list(...))
. Set to
options(.aqp.plotSPC.args = NULL)
to disable.fragmentSieve()
and
fragmentClasses()
.as.data.frame(<SPC>)
as shorthand for
as(<SPC>, 'data.frame')
plotSPC()
now marks truncated profiles with a ragged
bottom.fixOverlap()
now has two
label-placement solvers:
method = "E"
)method = "S"
)plotSPC()
.flagOverlappingHz()
for identifying
horizons with perfect overlapwarpHorizons()
for warping horizon
thickness (inflate/deflate)simulateColor()
adds multivariate simulation in CIELAB
colorspaceplotSPC()
when
fixLabelCollisions = TRUE
, adjustments suggested to
fixOverlap()
are now scaled correctly.explainPlotSPC()
reports label adjustment index when
label collision repair is enabled.explainPlotSPC()
.soilColorSignature()
gains arguments and perceptual
color distances (dE00) via {farver} package.as(<SPC>, "data.frame")
: Replace
plyr::join()
with merge()
.correctAWC()
: NA handling - return NA when frags are
NA.mutate_profile()
: Faster (data.table-based) evaluation
of profile-level expressions.profileApply
: Add support for custom
lapply()
-like function (APPLY.FUN
) for
processing chunks..interpretHorizonColor()
outputs to
last_spc_plot
in aqp.env
for use in custom
legend()
.simplify
argument to
SoilTextureLevels()
and ssc_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.profileInformationIndex()
methods and
performance boost.evalMissingData()
.