Learn R Programming

⚠️There's a newer version (2.2) of this package.Take me there.

aqp (version 1.40)

Algorithms for Quantitative Pedology

Description

The Algorithms for Quantitative Pedology (AQP) project was started in 2009 to organize a loosely-related set of concepts and source code on the topic of soil profile visualization, aggregation, and classification into this package (aqp). Over the past 8 years, the project has grown into a suite of related R packages that enhance and simplify the quantitative analysis of soil profile data. Central to the AQP project is a new vocabulary of specialized functions and data structures that can accommodate the inherent complexity of soil profile information; freeing the scientist to focus on ideas rather than boilerplate data processing tasks . These functions and data structures have been extensively tested and documented, applied to projects involving hundreds of thousands of soil profiles, and deeply integrated into widely used tools such as SoilWeb . Components of the AQP project (aqp, soilDB, sharpshootR, soilReports packages) serve an important role in routine data analysis within the USDA-NRCS Soil Science Division. The AQP suite of R packages offer a convenient platform for bridging the gap between pedometric theory and practice.

Copy Link

Version

Install

install.packages('aqp')

Monthly Downloads

2,609

Version

1.40

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Dylan Beaudette

Last Published

January 4th, 2022

Functions in aqp (1.40)

HzDepthLogicSubset

Subset SoilProfileCollection Objects or Horizons via checkHzDepthLogic
PMS2Munsell

Convert Pantone PMS codes to Munsell notation
accumulateDepths

Accumulate horizon depths, and reflect reversed depths, relative to new datum
SoilProfileCollection

An S4 object representation of a group of soil profiles.
plotSPC

Create Soil Profile Sketches
SoilTextureLevels

Ranking Systems for USDS Soil Texture Classes
addDiagnosticBracket

Annotate Diagnostic Features
addBracket

Add Depth Brackets
L1_profiles

Create Representative Soil Profiles via L1 Estimator
ROSETTA.centroids

Average Hydraulic Parameters from the ROSETTA Model by USDA Soil Texture Class
addVolumeFraction

Symbolize Volume Fraction on a Soil Profile Collection Plot
checkHzDepthLogic

Check a SoilProfileCollection object for errors in horizon depths.
alignTransect

Calculate Relative Positions from Transect Data
ca630

Soil Data from the Central Sierra Nevada Region of California
aggregateSoilDepth

Probabalistic Estimation of Soil Depth within Groups
allocate

Allocate soil properties within various classification systems.
checkSPC

Test for a valid SoilProfileCollection
as

Coerce SoilProfileCollection with as()
denormalize

Create a (redundant) horizon-level attribute from a site-level attribute
aqp-package

Algorithms for Quantitative Pedology
aggregateColor

Summarize Soil Colors
colorContrastPlot

Color Contrast Plot
.as.data.frame.aqp

Wrapper method for data.frame subclass conversion
estimateAWC

Estimate available water capacity for fine-earth fraction
.HSD

.HSD
estimatePSCS

Estimate boundaries of the particle size control section (U.S Soil Taxonomy; 12th edition)
confusionIndex

Confusion Index
$<-

Set data in column of horizon or site data in a SoilProfileCollection
colorQuantiles

Soil Color Range via Quantiles
$

Get data from column of horizon or site data in a SoilProfileCollection
depthOf

Get top or bottom depths of horizons matching a regular expression pattern
contrastChart

Color Contrast Chart
colorChart

Visualize soil colors in Munsell notation according to within-group frequency.
aqp_df_class,SoilProfileCollection-method

Get aqp_df_class entry from metadata or return a safe value.
argillic.clay.increase.depth

Return upper boundary of argillic horizon
coordinates,SoilProfileCollection-method

Get coordinates from spatial slot
contrastClass

Soil Color Contrast
compositeSPC

Return a list representation of site and horizon level data
depth_units,SoilProfileCollection-method

Get depth units from metadata
c,SoilProfileCollection-method

Combine SoilProfileCollection objects
depthWeights

Return a vector of contributing fractions over a depth interval
.data_dots

Make a data.frame from non-standard expressions evaluated in a data environment
equivalentMunsellChips

Identify "equivalent" (whole number value/chroma) Munsell chips
colorContrast

Metrics of Contrast Suitable for Comparing Soil Colors
.makeEquivalentMunsellLUT

.makeEquivalentMunsellLUT
estimateSoilDepth

Estimate Soil Depth
[[<-

Add or change column of horizon or site data in a SoilProfileCollection
getClosestMunsellChip

Get Approximate Munsell Chip
get.increase.matrix

compute pair-wise distances to determine where an attribute increases within a vertical distance specified
.parseGrouped_formula

.parseHSD_formula
getCambicBounds

Find all intervals that are potentially part of a Cambic horizon
barron.torrent.redness.LAB

Barron & Torrent (1986) Redness Index in LAB color space
fillHzGaps

Find and Fill Horizon Gaps
harmonize,SoilProfileCollection-method

Harmonize a property by profile-level denormalization for convenient visualization or analysis of ranges
get.increase.depths

Return the horizon top depths from a call to get.increase.matrix()
evalGenHZ

Evaluate Generalized Horizon Labels
hasDarkColors

Find horizons with colors darker than a Munsell hue, value, chroma threshold
fixOverlap

Fix Overlap within a Sequence via Simulated Annealing
depths<-,SoilProfileCollection-method

Initialize a SoilProfileCollection from a data.frame object
diagnostic_hz<-

Add data to the diagnostic slot
generalize.hz

Generalize Horizon Names
getArgillicBounds

Estimate upper and lower boundary of argillic diagnostic subsurface horizon
buntley.westin.index

Buntley-Westin (1965) Index
findOverlap

Find Overlap within a Sequence
brierScore

Multinominal Brier Score
bootstrapSoilTexture

Bootstrap Soil Texture Data
get.ml.hz

Determine ML Horizon Boundaries
glomApply

Subset an SPC by applying glom to each profile
crit.clay.argillic

Determines threshold (minimum) clay content for argillic upper bound
diagnostic_hz,SoilProfileCollection-method

Retrieve diagnostic data from SoilProfileCollection
correctAWC

Apply rock fragment or salt correction to available water content
dice

Efficient Slicing of SoilProfileCollection Objects
horizonNames<-

Set horizon column names
horizons,SoilProfileCollection-method

Retrieve horizon data from SoilProfileCollection
groupSPC

(EXPERIMENTAL) Store groupings within a profile collection.
hurst.redness

Hurst (1977) Redness Index
missingDataGrid

Missing Data Grid
groupedProfilePlot

Grouped Soil Profile Plot
getLastHorizonID

Get IDs of Deepest Horizons by Profile
hzTransitionProbabilities

Horizon Transition Probabilities
hzDepthTests

Tests of horizon depth logic
profileGroupLabels

Soil Profile Group Labels
repairMissingHzDepths

Repair Problematic Lower Horizon Depths
mixMunsell

Mix Munsell Colors via Spectral Library
profileInformationIndex

Soil Profile Information Index
getSoilDepthClass

Generate Soil Depth Class Matrix
harden.melanization

Harden (1982) Melanization
grepSPC

Subset SPC with pattern-matching for text-based attributes
horizonColorIndices

Horizon Color Indices
equivalent_munsell

Indices of "equivalent" Munsell chips in the munsell data set
hzdesgnname

Get or Set Horizon Designation Column Name
replaceHorizons<-

Replace data in the horizon slot
soilPalette

Soil Color Palette
spc_in_sync

Quickly assess relative state of site and horizon slots
soil_minerals

Munsell Colors of Common Soil Minerals
spec2Munsell

Convert reflectance spectra to closest Munsell chip
thompson.bell.darkness

Thompson-Bell (1996) Index
horizonDepths<-

Set horizon depth column names
[[

Get column of horizon or site data in a SoilProfileCollection
duplicate

Duplicte Profiles of a SoilProfileCollection
harden.rubification

Harden (1982) Rubification
textureTriangleSummary

Soil Texture Low-RV-High as Defined by Quantiles
evalMissingData

Evaluate Missing Data
getSurfaceHorizonDepth

Determine thickness of horizons (continuous from surface) matching a pattern
munsell.spectra

Spectral Library of Munsell Colors
hzTopographyCodeToLineType

Convert Horizon Boundary Topography to Line Type
munsell2spc,SoilProfileCollection-method

Merge Munsell Hue, Value, Chroma converted to sRGB & CIELAB into a SoilProfileCollection
huePositionCircle

Visual Description of Munsell Hue Ordering
rebuildSPC

Rebuild a SoilProfileCollection object
explainPlotSPC

Visual Explanation for plotSPC
munsellHuePosition

Munsell Hue Position Reference
hzTopographyCodeToOffset

Convert Horizon Boundary Topography to Vertical Offset
huePosition

Munsell Hue Reference and Position Searching
munsell2rgb

Convert Munsell Color Notation to other Color Space Coordinates (sRGB and CIELAB)
hzDesgn,SoilProfileCollection-method

Get horizon designation column name
glom,SoilProfileCollection-method

Subset soil horizon data using a depth or depth interval
hzID<-,SoilProfileCollection-method

Set horizon IDs
guessHzAttrName

Guess Horizon Slot Column Names
guessGenHzLevels

Guess Appropriate Ordering for Generalized Horizon Labels
rruff.sample

Sample XRD Patterns
reorderHorizons

Re-order corrupted horizon data
segment

Segmenting of Soil Horizon Data by Depth Interval
hzAbove

Horizons Above or Below
mutate_profile

Transform a SPC (by profile) with a set of expressions
jacobs2000

Soil Morphologic Data from Jacobs et al. 2002.
idname,SoilProfileCollection-method

Get profile ID column name
hzDistinctnessCodeToOffset

Convert Horizon Boundary Distinctness to Vertical Offset
invertLabelColor

Make High Contrast Label Colors
hztexclname

Get or Set Horizon Texture Class Column Name
hzidname<-

Set horizon ID column name
metadata,SoilProfileCollection-method

Retrieve metadata from SoilProfileCollection
pbindlist

Combine a list of SoilProfileCollection objects
pc

Numerical Soil Profile Comparison
min,SoilProfileCollection-method

Get the minimum bottom depth in a SoilProfileCollection
length,SoilProfileCollection-method

Get the number of profiles in a SoilProfileCollection
plot_distance_graph

Between Individual Distance Plot
sp2

Honcut Creek Soil Profile Data
slice-methods

Slicing of SoilProfileCollection Objects
lunique

Eliminate duplicate instances of profile IDs in a list of SoilProfileCollections
slab-methods

Slab-Wise Aggregation of SoilProfileCollection Objects
max,SoilProfileCollection-method

Get the maximum bottom depth in a SoilProfileCollection
parseMunsell

Parse Munsell Color Notation
panel.depth_function

Lattice Panel Function for Soil Profiles
plotColorMixture

Visualize Spectral Mixing of Munsell Colors
perturb

Perturb soil horizon depths using boundary distinctness
munsell

Munsell to sRGB Lookup Table for Common Soil Colors
sp3

Soil Profile Data Example 3
mollic.thickness.requirement

Calculate the minimum thickness requirement for Mollic epipedon
pms.munsell.lut

Pantone Colors / Munsell Lookup Table
overlapMetrics

Find and Quantify Overlap within a 1D Sequence
nrow,SoilProfileCollection-method

Get the number of horizons in a SoilProfileCollection
sim

DEPRECATED Simulate Soil Profiles
sp4

Soil Chemical Data from Serpentinitic Soils of California
sierraTransect

Soil Physical and Chemical Data Related to Studies in the Sierra Nevada Mountains, CA, USA.
names,SoilProfileCollection-method

Get names of columns in site and horizons table
sp5

Sample Soil Database #5
tauW

Compute weighted naive and tau statistics for a cross-classification matrix
texcl_to_ssc

Textural conversions
plotColorQuantiles

Visualize Color Quantiles
plotMultipleSPC

Plot Multiple SoilProfileCollection Objects
profileApply

Iterate over profiles in a SoilProfileCollection
previewColors

Preview Colors
profile_id<-

Set profile IDs
proj4string,SoilProfileCollection-method

Set PROJ4 string for the SoilProfileCollection
simulateColor

Simulate Soil Colors
proj4string<-,SoilProfileCollection,ANY-method

Set PROJ4 string for the SoilProfileCollection
random_profile

Random Profile
restrictions<-

Add data to the restrictions slot
shannonEntropy

Shannon Entropy
show

SoilProfileCollection show method
[,SoilProfileCollection-method

Matrix/data.frame-like access to profiles and horizons in a SoilProfileCollection
transform,SoilProfileCollection-method

Transform a SPC with expressions based on site or horizon level attributes
subApply

Subset SPC based on result of performing function on each profile
splitLogicErrors

Split a SoilProfileCollection into a list based on types of horizon logic errors
traditionalColorNames

Traditional Soil Color Names
spectral.reference

Standard Illuminants and Observers
sp1

Soil Profile Data Example 1
soiltexture

Lookup tables for sand, silt, clay, texture class, and textural modifiers.
slicedHSD

Tukey's HSD Over Slices
soilColorSignature

Soil Profile Color Signatures
validSpatialData,SoilProfileCollection-method

Get names of columns in site table
xtableTauW

Format a LaTeX table with results
restrictions,SoilProfileCollection-method

Retrieve restriction data from SoilProfileCollection
split,SoilProfileCollection-method

Split a SoilProfileCollection object into a list of SoilProfileCollection objects.
rgb2munsell

sRGB to Munsell Color Conversion
siteNames<-

Set site column names
site,SoilProfileCollection-method

Retrieve site data from SoilProfileCollection
subsetProfiles

DEPRECATED use subset
rowley2019

Soil Morphologic, Geochemical, and Mineralogy Data from Rowley et al. 2019.
summarizeSPC

Perform summaries on groups (from group_by) and create new site or horizon level attributes
sp6

Soil Physical and Chemical Data from Manganiferous Soils
subset,SoilProfileCollection-method

Subset a SoilProfileCollection with logical expressions
spc2mpspline,SoilProfileCollection-method

Missing-data-safe, SPC-wide wrapper around mpspline2::mpspline "continuous" 1cm output
unroll

Unroll Genetic Horizons
us.state.soils

US State Soils
subsetHz,SoilProfileCollection-method

Subset the horizons in a SoilProfileCollection using logical criteria
unique,SoilProfileCollection-method

Uniqueness within a SoilProfileCollection via MD5 Hash
trunc,SoilProfileCollection-method

Truncate a SoilProfileCollection to specified top and bottom depth