- new function
col2Munsell()
generalizes and replacesrgb2munsell()
(thanks Shawn Salley for the suggestion)
- CRAN release (CRAN check bugfix)
- new function
flagOverlappingHz()
for identifying horizons with perfect overlap fillHzGaps()
,dice()
,slab()
, and several other functions now safely handle horizons with perfect overlap (#296)
This is a major update to aqp that may create some issues for code depending on specific inputs/outputs in aqp < 1.42, particularly those relying on slice()
, slab()
, and profile_compare()
. slice()
and profile_compare()
are now 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 of the function.
Notable changes include:
- deprecation of
slice()
in favor of the new, faster, more robust implementation indice()
- complete overhaul of
slab()
, with new arguments, faster back-end, and weighted aggregation implemented (finally) - deprecation of
profile_compare()
in favor of theNCSP()
--a complete overhaul based on Maynard et al., 2020- site level attributes now handled by
compareSites()
- variable weights now possible via argument
- site level attributes now handled by
perturb()
andestimatePSCS()
are now vectorized, and optimized for larger collectionsmixMunsell()
now usesmixingMethod = 'exact'
by default for the simulation of subtractive mixturesgower
package moved to SUGGESTSplotColorMixture()
now using grid graphics functions to determine color swatch geometry and setting overlap detection threshold- 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 uses
electroStatics_1D()
for fixing horizon depth label overlap, solutions are deterministic and almost always better - 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:
- example data,
wilson2022
- fast prototyping of SPCs via
quickSPC()
and list / character templates - re-use arguments to
plotSPC()
viaoptions(.aqp.plotSPC.args = list(...))
- 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 bottomfixOverlap()
now has two label-placement solvers, based on 1) electrostatics and 2) simulated annealing- new depth axis styles in
plotSPC()
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 packageas(<SPC>, "data.frame")
: Replaceplyr::join()
withmerge()
correctAWC()
: NA handling - return NA when frags are NAmutate_profile()
: Faster (data.table-based) evaluation of profile-level expressions (#255)profileApply
: Add support for customlapply()
-like function (APPLY.FUN
) for processing chunks (#256)- Add
.interpretHorizonColor()
outputs tolast_spc_plot
inaqp.env
for use in customlegend()
(#254) - 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.
- CRAN release
getArgillicBounds()
,getCambicBounds()
,mollic.thickness.requirement()
,getSurfaceHorizonDepth()
and related functions have been optimized and now work on SoilProfileCollection objects with length > 1- Added
reduceSPC()
function for selecting a subset of minimal plus additional specified columns from a SoilProfileCollection - Added new "k-keyword"
.NHZ
for use withSoilProfileCollection
[
methodobject[,,.NHZ]
returns a vector with the number of horizons in each profile
- proper identification and conversion of Munsell value == 2.5
- interpolated reference spectra for Munsell value == 2.5
- neutral color chips in the Munsell look-up table are now based on direct measurement vs. estimation
plotSPC()
gains new arguments for controlling horizon depth labelsplotSPC()
gains horizon depth annotation collision fixes (ncss-tech#240)plotSPC()
minor bugfix for cases whenn != length(x)
plotSPC()
important change!y.offset
is now automatically re-ordered byplot.order
- bugfix for R 4.2, related to named arguments passed to
base::aggregate
(thanks AGB) depthOf()
and related functions: better handling ofNA
results fromFUN
- CRAN release
- fixed small bug in
panel.depth_function()
that affected plotting of grouped data, created byslab()
plotSPC()
now uses variable (vertical) text alignment for horizon depth labels- new function
profileInformationIndex()
estimateSoilDepth()
now requires a valid horizon designation (no longer attempts a guess)- {aqp} no longer masks {dplyr} verbs:
group_by()
,summarize()
,mutate()
- removed (deprecated)
f.noise()
andresample.twotheta()
: use {powdR} package instead - new functions:
texture_to_texmod()
andfragvol_to_texmod()
c/o @smroecker - faster, more robust version of
slice()
implemented asdice()
colorChart()
can now show neutral hues in a skinny panel- updates to
colorContrast()
,parseMunsell()
, andhuePosition()
to work properly with neutral hues huePosition()
gains new arguments and functionality:origin
anddirection
- new function
huePositionCircle()
for helping visualize differences in Munsell hue on the unit circle plotSPC
defaults change:width = 0.25
: slightly wider profile sketchesname = hzdesgnname(x)
: use metadata if present, no longer guessing. This may cause your figures to "lose" previously guessed horizon names, specify withname = 'column name'
or set metadata withhzdesgnname(x) <- 'hzname'
- CRAN release
- bug fix in
checkHzDepthLogic()
whenbyhz = TRUE
- new function
simulateColor()
for simulation of reasonable colors - new function
colorChart()
for graphical depiction of Munsell chip frequency by group
unique
method forSoilProfileCollection
objects now returns aSoilProfileCollection
by default- this may break existing code! use the new argument
SPC = FALSE
for previous behavior (ncss-tech#159)
- this may break existing code! use the new argument
aggregateColor()
now usesmixMunsell
for the estimation of soil color mixturesplotColorMixture()
will respect "names" attribute of colors-to-mix, without erroneous alpha-sortingparseMunsell()
now more robust and faster, c/o P. RoudiermixMunsell
:- new method
exact
for direct conversion of mixture spectra to sRGB or closest Munsell chip (viaspec2Munsell()
)
- new method
- new convenience function
PMS2Munsell()
for converting PMS codes -> closest Munsell chip (ncss-tech#124) glom()
z1
andz2
arguments vectorized to allow for profile-specific intervalsz1
andz2
support non-standard evaluation based on column names insiteNames(p)
, and also can take character vector (length 1) with column names insiteNames(p)
depthOf()
,minDepthOf()
,maxDepthOf()
,getSurfaceHorizonDepth()
,getMineralSoilSurfaceDepth()
,getPlowLayerDepth()
can now be applied to multiple profiles.- If the input
SoilProfileCollection
has more than one profile then result is adata.frame
containing profile ID, top or bottom depths, horizon designation and pattern
- If the input
- CRAN release
- Several
SoilProfileCollection
methods that conflict with {dplyr} 1.0+ have been deprecated:filter
,mutate
,group_by
,summarize
- New overloaded {base} names:
- {base}-like syntax: "filter" ->
subset
, "mutate" ->transform
, "combine" ->c
- {base}-like syntax: "filter" ->
- New unique {aqp}/SoilProfileCollection aliases:
*SPC
syntax:filterSPC
,mutateSPC
,groupSPC
,summarizeSPC
- Be aware
dplyr::combine
(deprecated in {dplyr} 0.7) still conflicts
aqp::union()
, previously deprecated, has been removed from namespace- Use
c()
orcombine()
forSoilProfileCollection
input - Use
combine()
orpbindlist()
forlist
input
- Use
- Methods that used {rlang} for non-standard evaluation now use {base}
plotSPC()
gains vectorizedy.offset
support (demonstrated in: http://ncss-tech.github.io/AQP/aqp/genhz-distance-eval.html)plotSPC()
gains argumentshrink.thin
for shrinking horizon designation labels when horizons are thin- new function
alignTransect()
for simplifying relative positioning of profile sketches plotMultipleSPC()
gains ability to automatically merge thematic legendscoordinates<-
will check formula terms (unique coordinates) in the@horizons
slot, if needed.- new function
spec2Munsell()
for converting reflectance spectra into sRGB coordinates or closest Munsell chip mixMunsell
:- new
mixingMethod
argument for selecting several mixing strategies - suggestions on interpreting spectral distances, message printed when greater than reasonable threshold
- new
- minor bug-fix in
panel.depth_function
when plotting grouped step-functions
- optimization of SoilProfileCollection
[,j]
-index extraction using {data.table} - introduction of
.LAST
,.FIRST
and.HZID
SoilProfileCollection "k-keywords" perturb()
is the new generalized replacement forsim()
andpermute_profile()
checkHzDepthLogic()
now has abyhz
argument for checking logic by horizon rather than profilefillHzGaps
now hasto_top
andto_bottom
arguments for filling above shallowest top / deepest bottom by profilefixOverlap()
more flexible and will usually settle on a solution in fewer iterations:overlapMetrics()
instead offindOverlap()
for part of objective function- cooling schedule is now fully adjustable via
T0
andk
arguments
alignTransect
helper function for computing relative positions and ordering vector supplied toplotSPC
plotSPC()
automatically convertslogical
data supplied tocolor
argument intofactor
glom()
is now vectorized over profilesestimateAWC
introduced for testing lookup table estimation of available water capacity (AWC) of fine-earth fractioncorrectAWC
introduced for testing corrections of AWC estimates for rock fragment and salts
fillHzGaps
: new function for fixing horizon depth topological errors and padding top/bottom of profiles with placeholder (empty) horizonsmixMunsell
now relies on suggested package {gower} for 5-10x speed bump- {aqp} no longer imports from {reshape} (less one dependency), all transformations from wide<->long are done via {data.table}
- methods from {data.table} are now imported by {aqp} (new dependency)
- Major overhaul of
plotColorQuantiles()
, now using {lattice} graphics - New dataset
equivalent_munsell
and methodequivalentMunsellChips
for "equivalent" Munsell chips lookup list based on all pairwise dE00 contrasts for integer "chips" in {aqp}munsell
data set - Argillic critical clay contents
crit.clay.argillic
rounded to whole numbers per NSSH Part 614, subpart B, sections 614.13 and 614.14
mutate_profile
usesdata.table::rbindlist(fill=TRUE)
to combine site- and horizon-level transformations- updates to horizon boundary encoding functions (
hzTopographyCodeToOffset
,hzTopographyCodeToLineType
,hzDistinctnessCodeToOffset
) - new function
L1_profiles
computes multivariate (L1) medians, compare to marginal medians viaslab
plotSPC
updates:- argument named changes:
hz.boundary.lty
is a horizon-level attribute that contains line type codes hz.topography.offset
a horizon-level attribute that contains representative offsets that encode horizon boundary topographyplotSPC
now encodeshz.topography.offset
using a vertical "bump" (chevron)
- argument named changes:
addBracket
can now accept multiple bracket annotations per profile
- CRAN release
- new lookup table
pms.munsell.lut
for converting Pantone spot color codes to (closest) Munsell chip - new function
duplicate
will makes copies of profiles within aSoilProfileCollection
- new example data
us.state.soils
: 50 state soils + PR and VI soils - simulate subtractive mixtures of Munsell colors with
mixMunsell
- see companion function
plotColorMixture
for visualization of spectra / mixture
- see companion function
- complete overhaul of
textureTriangleSummary
:- uses
soiltexture
package for visualization (plotrix
implementation dropped) - argument names changes (! may break old code, sorry)
- dropped simulation via
sim = TRUE
argument, seebootstrapSoilTexture
for a better approach
- uses
- new function
bootstrapSoilTexture
for simulating realistic sand/silt/clay compositions combine
replaces/expandsaqp::union
due to conflicts withbase::union
split
receives some upgrades to the S4 definition to increase parity withsplit.default
filter
is now an alias for new methodsubset
, which mirrorsbase::subset
estimateSoilDepth
losestop
andbottom
arguments, these are automatically extracted- two new SoilProfileCollection wrapper methods:
munsell2SPC
,spc2mpspline
- add
returnData
argument tocontrastChart
- improvements to
glom(..., invert=TRUE)
,glomApply
, and better tests - new wrapper method around
glomApply
:aqp::trunc
for cases when top and bottom depth interval is the same for all profiles in a SoilProfileCollection - fix for routing of
NULL
through$<-
andhorizons<-
orsite<-
(ncss-tech#163) - fix handling of missing metadata in (old) serialized SoilProfileCollection objects
- fix for promotion of
data.table
with character vector (not formula) interface
- enhanced SoilProfileCollection object validity checks via S4; new method
spc_in_sync
(ncss-tech#152) - optimization of
[
subset method and optional use ofdata.table
(ncss-tech#155) depths<-
has been optimized and minimally validates input data- default horizon ID (
hzID
) is now acharacter
data type aqp::union
usesdepths<-
internally; explicitly enforcing profile ID + top depth order in horizon data is safer but results in different ordering ifunion
-ing IDs that "intermingle" (need to be re-sorted).- new experimental method is
permute_profile
; similar tosim
but for boundaries. The interface to this function is likely to change/be expanded. - added
segment
c/o @smroecker - fix for unit-length and zero-length legends in
plotSPC
- fix for
plot
generic to showaqp::plot
in?plot
- basic support for promotion of
tbl_df
anddata.table
to SoilProfileCollection - new method
aqp_df_class
to determine class name in use in a SoilProfileCollection object plotSPC
upgrades (ncss-tech#146)- new methods related to mollic epipedon:
mollic.thickness.requirement
,hasDarkColors
- new
estimateSoilDepth
-like methods for depth to multiple features via pattern matching:depthOf
,minDepthOf
,maxDepthOf
- soil texture helper functions (
ssc_to_texcl
,texcl_to_ssc
,texmod_to_fragvoltot
,texture_to_taxpartsize
) - optimization of
[i,]
[,j]
subset methods for data.frame-based slots (ncss-tech#135) - new verbs:
mutate
,mutate_profile
(ncss-tech#118) - ROSETTA centroids and water retention by texture class (ncss-tech#131)
- fix for
getSurfaceHorizonDepth
with buried horizons / non-contiguous instances of matching horizons (ncss-tech#132) - fix for default
plotSPC
with small number of profiles ((ncss-tech#128) - remove implicit conversion to SpatialPointsDataFrame with unit-length
[
j-index subset ((ncss-tech#125) - fix in slab when
slab.structure[2] > max(x)
- proof of concept for tidy SoilProfileCollection subsetting
- define
[[
subsetting method; an "ambivalent" accessor for site- or horizon-level properties - new subset verbs
grepSPC
,filter
,subApply
for use in%>%
-lines
- CRAN release
- new functions:
hzDesgn()
, get horizon designations from a SPC - new functions:
hzdesgnname()
/hzdesgnname()<-
andhztexclname()
/hztexclname()<-
get/set column containing horizon designations and texture classes - better error/logic handling for
glom()
profileApply()
enhancement for largeSoilProfileCollection
objects (ncss-tech#112)- add
profileApply()
frameify
argument fordata.frame
output (ncss-tech#111) checkHzDepthLogic()
replacestest_hz_logic()
- thanks to farver >= 2.0.3,
rgb2munsell()
andcolorQuantiles()
now uses the CIE2000 distance metric for color comparison
- bug fix (rare) when setting / replacing horizon attributes (ncss-tech#105)
- bug fix in
colorQuantiles
untilfarver
2.0.2 is available on CRAN SoilProfileCollection
object gains new slot:@restrictions
, fix old objects withrebuildSPC()
evalMissingData()
gets new argument for relative vs. absolute evaluation of missing datahorizonColorIndices()
,harden.rubification()
,harden.melanization()
,thompson.bell.darkness()
and associated functions in soilColorIndices.R- fix for ncss-tech#44
- fix for ncss-tech#66
- new example data:
rowley2019
- dropped some dependencies
- removing imported functions from
Hmisc
(hdquantile
), loadingaqp
is now much fasterslab()
now usesstats::quantile()
as the default slab function- details at: ncss-tech#79
- previous behavior of
slab()
can be activated via argument:slab.fun = aqp:::.slab.fun.numeric.HD
generalize.hz()
gets a \dots argument for passing additional arguments togrep()
, e.g.perl=TRUE
addVolumeFraction()
can now accept a vector of colors, as many as number of horizons- new sample data:
jacobs2000
, pending documentation aggregateColor()
faster and more accurate, using delta-E00 for quantized colors c/o {farver} (see ncss-tech#98)- new functions
contrastChart()
andsoilPalette()
- aqp 1.18 scheduled for next CRAN release
plotSPC()
gains a new argument for relative positioning:relative.pos
- relative positioning helper function:
fixOverlap()
, see manual page for examples explainPlotSPC()
,addDiagnosticBracket()
, andaddVolumeFraction()
updated accordingly
- new functions colorContrast(), contrastClass(), and huePosition()
- fixed nasty bug in [-indexing when SPC contains a single profile (ncss-tech#85)
- new function validSpatialData() to test for place-holder contents of @sp
- rebuildSPC() will now correct invalid, place-holder SpatialPoints in @sp
- new version number system
plotSPC()
will now attempt to create multi-row legends when using a factor > n.legend levelsplotSPC()
will now generate > 10 colors for legends associated with a factor (ncss-tech#9)munsell2rgb()
will now return CIE LAB coordinates if requested (ncss-tech#69)
- CRAN release
aggregateColor()
gets a new feature, similar colors can be grouped via cluster::pam()- new functions:
previewColors()
,colorQuantiles()
,plotColorQuantiles()
- new function:
horizonDepths()<-
, edit top/bottom names after SPC init - new function:
profile_id()<-
, edit profile IDs after init; be careful! - new functions:
hzID()
andhzID()<-
, get/set unique horizon IDs - new functions:
hzidname()
andhzidname()<-
, get/set column containing unique horizon IDs rbind.SoilProfileCollection()
has been deprecated in favor ofunion()
, gains new functionality: ncss-tech#71- bug fixes in sanity checks within
horizonNames()<-
- !!! SoilProfileCollection internal structure has changed: ncss-tech#74
- see release notes for more: https://github.com/ncss-tech/aqp/releases/tag/v1.17
- partial bug fix in test_hz_logic() related to missing top AND bottom depths, needs work: ncss-tech#65
- moved
explainPlotSPC
from SPC tutorial toaqp::explainPlotSPC()
plotSPC()
is a little better at estimating "extra" vertical / horizontal space, still needs work (ncss-tech#62)
- fixing #53 and #54
- bug fix for too many decimal places in legend classes (floating point -> character issue)
plotSPC()
gets a new argument,n.legend
: approximate number of classes
- enhancement to
aggregateColor()
for cases when horizon depths are missing or top/bottom logic flipped
- bug fix for
addVolumeFraction()
when fragment volume > 100%
- added a new argument to
addDiagnosticBracket()
allowing for specification of column containing diagnostic feature kind addBracket()
now requires a data.frame with plotting details, see manual page
- added
shannonEntropy()
,confusionIndex()
, andbrierScore()
- bug fix in
get.ml.hz()
for horizon names that start with number or punctuation get.ml.hz()
now uses internal aqp functions for Shannon entropy and Brier scores
- push to CRAN, getting ready for aqp 2.0
missingDataGrid()
relaxingslice()
withstrict=FALSE
- CIELAB colors are now in the
munsell
look-up table
plotSPC()
now able to deal with missing horizon data (thanks Stephen R.)- this is likely the last release before aqp 2.0
rgb2munsell()
now uses CIELAB colorspace for lookup, results are more accurate as compared to using sRGB colorspace
texture.triangle.low.rv.high()
renamed totextureTriangleSummary()
. The old name still works, but a message is issued- new argument to
textureTriangleSummary()
texture.names
: for toggling texture class names - minor bug fix in
textureTriangleSummary(..., sim=TRUE)
, previous simulated compositional data was not correct because the stats::var() was being used vs. compositions::var.acomp(). the variance / covariance values were 2-5x too small. - new function
tauW()
, added by D.G. Rossiter: see manual page for references
- fixed major bug (ncss-tech#23) related to editing horizon-level attributes after
rbind
-ing
- new dataset
soil_minerals
with some common soil mineral colors source: http://www.nrcs.usda.gov/wps/portal/nrcs/detail/soils/edu/?cid=nrcs142p2_054286 - added clarification to Munsell color conversion: changed "RGB" to "sRGB".
- new function for estimating the closest Munsell chip:
getClosestMunsellChip()
- new example data set (
sp6
) based on http://www.sciencedirect.com/science/article/pii/S0016706111001972
munsell2rgb()
can now accommodate neutral hues (N), and values of "2.5", see manual page for details
- new function:
soilColorSignature()
, see manual page - new function:
parseMunsell()
for converting strings of '10YR 2/2' into R colors or RGB triplets- this is a convenience function that calls
munsell2rgb
on parsed strings of full Munsell notation
- this is a convenience function that calls
- minor changes to
profile_compare()
, getting ready for a complete overhaul to this function - new function:
evalMissingData()
, see manual page
- documentation for new transition probability functions, see ?hzTransitionProbabilities for details
- better checking for other places where the bug fixed in rbind.SoilProfileCollection (aqp 1.9.3) could occur
- new functions:
genhzTableToAdjMat
,hzTransitionProbabilities
- fixed a nasty bug in
rbind.SoilProfileCollection()
related to object re-ordering- in aqp < 1.9.3: there was a chance than
profile_id(x)
andsite(x)[[idname(x)]])
would not match - bugs like this will no longer be a possibility after aqp 2.0, new SPC object structure planned
- in aqp < 1.9.3: there was a chance than
groupedProfilePlot()
gains some new arguments and better documentation (see manual page)plot.SoilProfileCollection
gains argument:default.color
(see manual page)
- added neutral colors to
munsell2rgb()
- new function
guessGenHzLevels()
- new function
aggregateColor()
and associated helper functionsharpshootR::aggregateColorPlot()
- more code clean-up and fixes in examples to make
R CMD check --as-cran
happy - fixed some ancient examples in the
profileApply()
manual page
- bug fixes and documentation updates
digest::digest
is now imported by default- better documentation for unique-method of
SoilProfileCollection
objects
- updated documentation
- plotSPC gets a new argument:
x.idx.offset
: allows for plotting of multiple SPC objects within the same figure, see examples - plotSCP gets a new argument:
plot.depth.axis
: enable / disable depth axis, useful for multi-collection plots - new function:
profileGroupLabels
: simple annotation for groups of profiles within a profile sketch, see manual page for examples - new function:
plotMultipleSPC
: plot several SPC objects on the same axis, see manual page for examples
- fixed bugs in
addBrackets()
,panel.depth_function()
, andplotSPC()
- new arguments to
addBrackets()
allow for annotation of brackets
- names() method for SoilProfileCollection objects returns a concatenated vector of horizon + site names
- siteNames() and horizonNames() can now be used to extract from SoilProfileCollection
- siteNames<- and horizonNames<- can now be used to change names; experimental!
- note: internal structure of SoilProfileCollection objects will be changing soon!!!
- texture.triangle.low.rv.high(): new arguments, likely breaking previous usage when method='closest', see manual page for details
- bug fix c/o Jose Padarian: SPC objects now understand logical indexing rules
- removed
spatial_subset()
: this functionality can be accomplished outside of AQP and removes dependency on rgeos package
- bug fix c/o Jos? Padarian: when promoting coordinates from @site, drop=FALSE is required to prevent a single remaining attribute from being down-graded to a vector-- thanks!
- get.ml.hz() now returns a "pseudo" Brier Score, using the most-likely horizon label as the "correct" value
- new function rgb2munsell()
- new function estimateSoilDepth()
- new function getSoilDepthClass()
- new documentation / tutorials
- When applied to a single categorical variable, the results from slab() now contain an attribute 'original.levels'
that contains the original factor levels. This is important because when casting from long->wide format, illegal
column names are scrubbed by make.names(). This process would convert horizon designations like '2Bt' into 'X2Bt'.
You can recover the original horizon names via
attr(x, 'original.levels')
.
- plotSPC() has a new argument:
label
, used to set site-level attribute containing profile labels
- plotSPC() now registers plotting parameters in the environment
aqp.env
- new function addVolumeFraction() for annotating profile plots with volumetric information (e.g. rock fragment volume)
- plotSPC() attempts to guess which column contains horizon designations
- plotSPC() can now color horizons based on continuous soil properties (e.g. clay content)
- rbind.SoilProfileCollection() now re-orders data according to the new set of profile IDs
- this fixes several problems associated with assumptions in profile_compare()
- profile_compare() will be re-written soon to work natively with SPC objects
- new function addBracket() for annotating profile sketches with depth-brackets; useful for plotting diagnostic features
- new function missingDataGrid() for graphically describing the presence of missing data in an SPC object
- panel.depth_function() now prints "contributing fraction" values in the same color as corresponding depth-function lines and shaded areas
- panel.depth_function() gains an argument 'cf.col' for manually specifying the CF color
- panel.depth_function() gains an argument 'cf.interval' for manually specifying printed CF depths
- prepanel.depth_function() now extends x-lim by 5% in either direction for cleaner-looking plots
- added some details to slab() documentation
- fixed minor bug in min() and max() methods for SoilProfileCollection objects in the presence of missing data
- min() and max() methods for SoilProfileCollection objects now have a second argument for checking depth based on the presence of data in that column
- removed excessive checking in SoilProfileCollection init code, this may speed things up
- previously identified horizonation errors may no longer result in ERRORS; be sure to test
- test_hz_logic() now more useful:
- always checks for NA and overlapping horizons
- no longer called with initialization of SoilProfileCollection objects
- note that default behavior has changed since version 1.5
- moved related documentation to test_hz_logic manual page
- new mini-vignette on dealing with bad data (dealing-with-bad-data.html)
- better documentation for slice()
- new warnings related to missing data in the grouping variable passed to slab()
- profileApply() can now return arbitrary objects = new subsetting/transformation possibilities
- see ?profileApply for examples
- panel.depth_function() can now display contributing fraction values with grouped data
- see multi-variate example in ?slab
- HTML version of all documentation (including images) auto-generated via knitr and available on the r-forge website
- new function:
texture.triangle.low.rv.high()
plots texture data with low-high range defined by quantiles
- updated documentation and SoilProfileCollection tutorial
- plans laid for parallel processing in
slab()
andprofileApply()
via 'parallel' package plotSPC()
gets adensity
argument for shaded coloring of horizons
slab()
re-written from scratch, resulting in reduced memory footprint and quicker running time ! older code based on slab() is likely to now broken- sorry, it won't happen again- the new code is much slimmer and based on aggregate() rather than ddply
- function arguments have changed so be sure to check the manual page
- user-supplied functions are now much simpler to write and rely on vectors rather than data.frames (= faster)
- the next major release will contain additional examples of how to use the new features
- new function
sim()
for simulation based on a template soil profile, proper documentation pending...
- new function
subsetProfiles()
for simpler subsetting ofSoilProfileCollection
objects via site or horizon-level attributes get.ml.hz()
now returns a 'confidence' for each horizon (as a percent)- added experimental 'filter' argument to profile_compare()- see manual page for usage
- added new argument to plot.SoilProfileCollection()- alt.label: used to add secondary labeling via data in @site
- plot.SoilProfileCollection() will now do a better job of selecting the location for profile IDs based on label length, font size, and figure size
- minor tweaks to plot.SoilProfileCollection() for improved output with small/large size collections
- new function get.ml.hz() attempts to determine the most likely horizonation after slabbing
- fixed bug in profileApply() where further arguments to FUN weren't passed on to FUN
- missing data report from profile_compare() now only includes horizons with some data (e.g. Cr and R horizons are skipped)
- speed-bump in profileApply()
- splitProfiles() function is no longer defined/used/needed
- bug fix in SoilProfileCollection subsetting via []
- SoilProfiles with a single horizon confused subsetting in the presence of spatial data
- added rbind.SoilProfileCollection() for concatenating SPC objects
- this function performs basic sanity checks, but cannot combine unlike objects
- fixed minor bug in prepanel.depth_function() where an error would occur when input data was all NA
- new 'unique' method for SoilProfileCollection objects, returns indices of unique profiles
- fixed bug in NAMESPACE that caused an error when 'sp' library wasn't loaded
- added another sanity check to 'site<-' for cases where duplicates occur in the source data set
- added some new documentation to package help page see 'help(aqp)' for details
- the names() method for SoilProfileCollection objects now returns a named list of horizon and site column names
- improved examples: see ?sp4 and ?ca630
- fixed minor bug related to subsetting a SoilProfileCollection object, followed by coercion to SpatialPointsDataFrame
- plot() method for SoilProfileCollection object no longer sets page margins, this will cause some figures to change
- added demo 'slope_effect_hz_thickness'
- fixed minor bug in panel.depth_function(): grouping + paneling ignored full suite of colors
- fixed minor bug in NAMESPACE
- minor bug fix in unroll(), was not previously respecting the max depth argument
- minor speed-bump and simplification of profile_compare()
- documentation updates
- added helper message related to profile_compare() stopping when any profile contains insufficient data
- profile_compare() now issues a notice when some data are missing, leading to biased results
- slice() now computes the fraction of variables within a slice that are missing data ! bug introduced into slab() when use.wts=TRUE [should have a fix soon]
- merged documentation for soil.slot() and slab()
- slab() should be used in all places where soil.slot() was used
- soil.slot() will disappear from the package NAMESPACE eventually, so don't use it directly!
- minor bug fix in panel.depth_function()
- cleanup of documentation and examples
- added horizon boundary distinctness code conversions and plotting functionality
- see ?sp1 and ?random_profile for new examples
- More NAMESPACE cleaning
- Cleaned NAMESPACE and DESCRIPTION
- removed un-necessary dependencies
- join added to the plyr imports
- added scales to the Imports as well, and removed rescaler() in the code, repaced by scales::rescale
- hack in munsell2rgb to avoid the 'no visible binding for global variable 'munsell' at package R CMD check and make the whole thing more robust (using load and system.file rather than data(...)
- Dylan is now the only maintainer, as per Uwe request
- when using plyr **ply function, switched from using the .(foo) interface to "foo" - seems more foolproof
- 1.0 release, still missing condensed vignettes- should be ready soon
- see http://casoilresource.lawr.ucdavis.edu/drupal/taxonomy/term/56 for samples
- A small bug in profile_compare() was fixed, where slices were evaluated as 'soil' based on the bottom depth of the profile, and NOT on the presence of actual data. See ?profile_compare for details. This change will have a minor affect on profile comparisons in cases where Cr or R horizons (usually missing most characterization data) have been extended down to some arbitrary depth (usually 150 or 200 cm) AND a maximum depth of evaluation (max_d) was set beyond the actual depth of most profiles in the collection.
- profile_compare() will now use site-level attributes if input is a SoilProfileCollection
- horizon / site level data currently weighted equally
- NOTE: this feature is new, test-first!
- minor bug fixes in profile_compare() to remove spurious warnings
- better error check in slice()
- removed old code and documentation: format_slices() and plot_slices()
- spurious warnings from profile_compare() caused by daisy() now suppressed
- warnings were generated when calling daisy() on a matrix of all NA which typically occurred when using too-large a lower depth for evaluation of D
- preliminary support for diagnostic horizons via diagnostic_hz()
- new examples
- error and warnings messages cleaned-up
- converting all messages passed to the user from cat() to message() and warning()
- profile_compare() and slab() now default to no progress bars, see 'progress' argument to adjust
- profileApply() now provides access to all aspects of the SoilProfileCollection object
- that means that: profileApply(SPC, function(x) ... ) operates on x, which is a soilProfileCollection containing only profile_i note that this may break functionality based on aqp 0.99-9.3
site(SCP) <- d
now tries to merge data from SPC@site with 'd' via left join- this means that all new SPC objects will have a single column of @site data, containing profile IDs
- plot-SoilProfileCollection now tries to guess the best orientation of IDs
- override with id.style='top' or id.style='side'
- slice-SoilProfileCollection now accepts '.' to define all columns should be returned at requested slices
- slice(SPC, 1:50 ~ . ) # this means all vars. ID, top, bottom are automatically removed
- pedonPC, NASIS, and SDA functions moved out of aqp, and into new package: soilDB
- removed associated, suggested packages from aqp
- soilDB will be on CRAN shortly
- new argument to plot(SoilProfileCollection, ..., divide.hz=TRUE|FALSE) that can optionally suppress plotting of dividing lines between horizons (suggested by Ludwig Hilger)
- new function profileApply() for applying functions by profile
- almost ready for AQP 1.0, vignettes are the last missing piece :)
- slice(SPC, ...) is now 10-100x faster, scales linearly
- slice(SPC, ...) can simultaneously slice categorical and continuous variables
- converted ID column in sample data to character class
- fixed a bug in slice() where NA would be returned when IDs were factors
- added test to depths()<- such that factor IDs are converted into character IDs and a warning is issued
- added join conditions for most functions using plyr::join(), resulting in less chatter on the console
- WARNING: soil.slot.multiple() renamed to slab()
- fixed minor bug in slice(), when numerical IDs are used: ddply() and cast() implicitly re-order data...
- added
strict
argument to many functions, to gracefully account for bad horizon data- enforce quality control with strict=TRUE
- munsell2rgb() is now 100x faster thanks to plyr::join()
- note that factors cannot be used in the conversion, see: hadley/plyr#43 + there is a check and conversion within the function that should prevent segfaults
- documentation updates, demo(aqp) updates, more examples
- bug fix in slice(), now works with numeric OR categorical vars, but NOT both...
- matrix-style subsetting functional:
- s[i, j] ---> i is the profile index, and j is the horizon/slice index
- s[i, ] returns a SoilProfileCollection
- s[, j] returns a SpatialPointsDataFrame when a single slice is used
- spatial_subset() can be used to extract members of a SoilProfileCollection with a geometry (uses rgeos)
- smarter $<- methods so that site/horizon data slots are auto-selected
- added "site(SoilProfileCollection) <-" method for data.frame
- started VERY basic AQP Introduction vignette... still experimental
- adding coercion methods for common objects and sp-class objects
- matrix-style subsetting almost works:
- s[i, j] ---> i is the profile index, and j is the horizon/slice index
- added a 'slice' method for SoilProfileCollection objects
- returns selected variables along depth slice(s) (i.e. no aggregation)
- added NAMESPACE file for R >= 2.14 compatibility
- stabilized S4 class, working on S4-izing all related functions
- preliminary documentation on the new S4 classes/methods
- logistic power peak (LPP) can now be used to generate synthetic depth functions
- added contributing fraction annotation in panel.depth_function()
- minor bug fixes and enhancements in PedonPC function
- S4 interface to soil.slot.multiple()
- added S4 class/methods for
SoilProfileCollection
- this supersedes the (now removed) S3
SoilProfileList
classes - basic accessors/setters are in place, subject to change
- this supersedes the (now removed) S3
- profile_plot() now uses the
SoilProfileCollection
class- initSoilProfileList() is no longer supported; see depths() for similar functionality
- expect some tumultuous times ahead in the API... should be ironed out by 1.0 release
- soil.slot() will now accept boundaries defining a 'slab' over which aggregates are computed
- soil.slot.multiple() now cleanly wraps soil.slot(), accepting all arguments
- these two changes make it possible to ask: "what is the wt. mean value of some property within this slab, and among these groups?"
- soil.slot.multiple() now uses a formula interface: NOTE that this will break existing scripts (sorry)
- new functions for getting data out of PedonPC (MS Access) databases [windows only for now]
- get_site_data_from_pedon_db() : site and pedon aggregate data
- get_hz_data_from_pedon_db() : horizon level data
- get_colors_from_pedon_db() : formats and mixes multiple colors / horizon
- implemented in mix_and_clean_colors()
- test_hz_logic() : basic function for testing horizon logic, returns TRUE/FALSE by ID
- parallel operations now NON-functional, while we wait for plyr to support doSMP...
- new ID plotting style for profile_plot() : handy when plotting large collections and/or long IDs
- code and documentation clean-up
- Soil Sata Access (SDA) query functions have been added
mapunit_geom_by_ll_bbox()
: get map unit geometry by bounding boxMUKEYS_by_ll_bbox()
: get map unit keys by bounding boxSDA_query()
: retrieve soil tabular data via query written in SQL
- additional customization added to
plotSPC
- two new sample data sets + examples
- soil.slot() and profile_compare() now have support for parallel computation thanks to bug-fixes in plyr 1.4
- plyr >= 1.4, foreach, and doMC packages are required
- specific examples are not yet documented, but should be soon
- this feature is still experimental! testing is advised
profile_compare()
now calculates slice-wise dissimilarity matrices in 1/3 the time (thanks llply!)
- fixed minor bug in soil.slot() when computing probabilities from profiles that had missing horizons and that had only a single class within the variable to be aggregated
- added basic demo: demo(aqp)
- soil.slot() now computes aggregate probabilities over user-defined segments
- re-write of weighted profile aggregation functions
- aqp package now requires Hmisc package
- using Hmisc::wtd.{mean,var,quantile} to compute values
- better adjustment of weights when computing weighted SD
- fixes long-standing bugs with wt. mean/SD when NA present in x_i and not in wt_i
- weighted quantiles now computed
- addition of new (experimental) S4 classes and methods
- these are now in the aqp_S4 branch
- added n.depth.ticks option to profile_plot()
- profile_compare() algorithm stabilized, new default settings
- removed code in profile_compare() that is now obsolete
- note that this will cause changes to numerical classification of soil profiles
- verified that weighted standard deviations are correct when seg_size > 1
- removed notices about possible problems with sd calculations
- soil.slot() streamlined and functionality restored to pre-0.95 condition
- fixed weighted mean / SD calculation when using 1 unit segments in soil.slot()
- wt. mean / SD still disabled for user-defined segment sizes
- temporarily disabled parallel computation, will be re-added in next release
- bug fixes in panel.depth_function where 'groups' was not defined
- bug fixes and major re-factoring of soil.slot() when called with user-defined segment size, or segmenting vector:
- SD values are probably too low due to an inflated 'n' in the calculation
- calculation of weighted mean and sd is currently disabled
- added VERY experimental support for parallel processing based on the latest versions of plyr, doMC, and foreach packages
- updated vignette with technical details on aggregation and dissimilarity computation
- new options to profile_plot()
- fixed bug in soil.slot() when aggregating a categorical variable, with a user-supplied segmenting vector
- soil.slot() now requires that categorical variables be encoded as factors
- bug fixes, new documentation + examples
- AQP now requires R >= 2.9.0
- including a new column in the results from soil.slot(), denoting number of profiles used in slice-wise aggregation
- added note to soil.slot() manual page highlighting possible problems with SD calculation
- better error checking on profile aggregation and classification functions
- most functions now require that horizon depths are integers
- added plot_distance_graph() function for visualizing between-profile dissimilarity
- updated documentation: extended manual is now accessible as a vignette
- major improvements in profile_compare() when add_soil_flag=TRUE and replace_na=TRUE
- appears to create much more realistic groupings when there are both shallow and deep soils in the collection
- new functionality requires further testing
- plotting under dendrograms generated by ape::plot.phylo() may need some manual adjustments
- new version of plyr (1.0) should speed up most functions in aqp package
- added support for user-defined aggregate functions in soil.slot and soil.slot.multiple
- planning addition of PCA by depth slice
- planning addition of equal-area spline fitting