Learn R Programming

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

aqp (version 1.41)

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,080

Version

1.41

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Dylan Beaudette

Last Published

February 11th, 2022

Functions in aqp (1.41)

checkSPC

Test for a valid SoilProfileCollection
SoilTextureLevels

Ranking Systems for USDS Soil Texture Classes
PMS2Munsell

Convert Pantone PMS codes to Munsell notation
barron.torrent.redness.LAB

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

Probabalistic Estimation of Soil Depth within Groups
ROSETTA.centroids

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

Calculate Relative Positions from Transect Data
depths<-,SoilProfileCollection-method

Initialize a SoilProfileCollection from a data.frame object
jacobs2000

Soil Morphologic Data from Jacobs et al. 2002.
$<-

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

Multinominal Brier Score
addBracket

Add Depth Brackets
SoilProfileCollection

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

Annotate Diagnostic Features
diagnostic_hz<-

Add data to the diagnostic slot
plotSPC

Create Soil Profile Sketches
correctAWC

Apply rock fragment or salt correction to available water content
c,SoilProfileCollection-method

Combine SoilProfileCollection objects
horizonDepths<-

Set horizon depth column names
evalMissingData

Evaluate Missing Data
aqp_df_class,SoilProfileCollection-method

Get aqp_df_class entry from metadata or return a safe value.
confusionIndex

Confusion Index
as

Coerce SoilProfileCollection with as()
bootstrapSoilTexture

Bootstrap Soil Texture Data
HzDepthLogicSubset

Subset SoilProfileCollection Objects or Horizons via checkHzDepthLogic
L1_profiles

Create Representative Soil Profiles via L1 Estimator
plotColorMixture

Visualize Spectral Mixing of Munsell Colors
contrastClass

Soil Color Contrast
contrastChart

Color Contrast Chart
checkHzDepthLogic

Check a SoilProfileCollection object for errors in horizon depths.
colorContrastPlot

Color Contrast Plot
colorQuantiles

Soil Color Range via Quantiles
missingDataGrid

Missing Data Grid
hzTransitionProbabilities

Horizon Transition Probabilities
allocate

Allocate soil properties within various classification systems.
dice

Efficient Slicing of SoilProfileCollection Objects
horizonNames<-

Set horizon column names
ca630

Soil Data from the Central Sierra Nevada Region of California
getArgillicBounds

Estimate upper and lower boundary of argillic diagnostic subsurface horizon
depthWeights

Return a vector of contributing fractions over a depth interval
coordinates,SoilProfileCollection-method

Get coordinates from spatial slot
explainPlotSPC

Visual Explanation for plotSPC
addVolumeFraction

Symbolize Volume Fraction on a Soil Profile Collection Plot
argillic.clay.increase.depth

Return upper boundary of argillic horizon
.as.data.frame.aqp

Wrapper method for data.frame subclass conversion
generalize.hz

Generalize Horizon Names
$

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

Generate Soil Depth Class Matrix
estimateSoilDepth

Estimate Soil Depth
estimatePSCS

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

Find Overlap within a Sequence
aqp-package

Algorithms for Quantitative Pedology
texcl_to_ssc

Textural conversions
colorChart

Visualize soil colors in Munsell notation according to within-group frequency.
accumulateDepths

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

Summarize Soil Colors
compositeSPC

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

Subset soil horizon data using a depth or depth interval
equivalent_munsell

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

Find and Fill Horizon Gaps
hzTopographyCodeToOffset

Convert Horizon Boundary Topography to Vertical Offset
get.increase.matrix

compute pair-wise distances to determine where an attribute increases within a vertical distance specified
depth_units,SoilProfileCollection-method

Get depth units from metadata
[[<-

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

Metrics of Contrast Suitable for Comparing Soil Colors
guessHzAttrName

Guess Horizon Slot Column Names
buntley.westin.index

Buntley-Westin (1965) Index
rruff.sample

Sample XRD Patterns
denormalize

Create a (redundant) horizon-level attribute from a site-level attribute
reorderHorizons

Re-order corrupted horizon data
evalGenHZ

Evaluate Generalized Horizon Labels
grepSPC

Subset SPC with pattern-matching for text-based attributes
get.ml.hz

Determine ML Horizon Boundaries
diagnostic_hz,SoilProfileCollection-method

Retrieve diagnostic data from SoilProfileCollection
min,SoilProfileCollection-method

Get the minimum bottom depth in a SoilProfileCollection
getSurfaceHorizonDepth

Determine thickness of horizons (continuous from surface) matching a pattern
plotColorQuantiles

Visualize Color Quantiles
getLastHorizonID

Get IDs of Deepest Horizons by Profile
munsell.spectra

Spectral Library of Munsell Colors
depthOf

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

Fix Overlap within a Sequence via Simulated Annealing
plotMultipleSPC

Plot Multiple SoilProfileCollection Objects
hztexclname

Get or Set Horizon Texture Class Column Name
getClosestMunsellChip

Get Approximate Munsell Chip
hasDarkColors

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

Get column of horizon or site data in a SoilProfileCollection
crit.clay.argillic

Determines threshold (minimum) clay content for argillic upper bound
groupSPC

(EXPERIMENTAL) Store groupings within a profile collection.
hzAbove

Horizons Above or Below
trunc,SoilProfileCollection-method

Truncate a SoilProfileCollection to specified top and bottom depth
slice-methods

Slicing of SoilProfileCollection Objects
length,SoilProfileCollection-method

Get the number of profiles in a SoilProfileCollection
lunique

Eliminate duplicate instances of profile IDs in a list of SoilProfileCollections
siteNames<-

Set site column names
profile_id<-

Set profile IDs
random_profile

Random Profile
.data_dots

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

Duplicte Profiles of a SoilProfileCollection
slab-methods

Slab-Wise Aggregation of SoilProfileCollection Objects
hzTopographyCodeToLineType

Convert Horizon Boundary Topography to Line Type
glomApply

Subset an SPC by applying glom to each profile
getCambicBounds

Find all intervals that are potentially part of a Cambic horizon
plot_distance_graph

Between Individual Distance Plot
harden.melanization

Harden (1982) Melanization
invertLabelColor

Make High Contrast Label Colors
horizonColorIndices

Horizon Color Indices
hzID<-,SoilProfileCollection-method

Set horizon IDs
subApply

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

Convert Horizon Boundary Distinctness to Vertical Offset
xtableTauW

Format a LaTeX table with results
profileInformationIndex

Soil Profile Information Index
sp3

Soil Profile Data Example 3
metadata,SoilProfileCollection-method

Retrieve metadata from SoilProfileCollection
estimateAWC

Estimate available water capacity for fine-earth fraction
groupedProfilePlot

Grouped Soil Profile Plot
hzidname<-

Set horizon ID column name
get.increase.depths

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

Identify "equivalent" (whole number value/chroma) Munsell chips
panel.depth_function

Lattice Panel Function for Soil Profiles
munsell2rgb

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

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

Rebuild a SoilProfileCollection object
soil_minerals

Munsell Colors of Common Soil Minerals
harden.rubification

Harden (1982) Rubification
harmonize,SoilProfileCollection-method

Harmonize a property by profile-level denormalization for convenient visualization or analysis of ranges
hzDesgn,SoilProfileCollection-method

Get horizon designation column name
hzdesgnname

Get or Set Horizon Designation Column Name
soiltexture

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

Mix Munsell Colors via Spectral Library
idname,SoilProfileCollection-method

Get profile ID column name
sim

DEPRECATED Simulate Soil Profiles
sp2

Honcut Creek Soil Profile Data
subset,SoilProfileCollection-method

Subset a SoilProfileCollection with logical expressions
overlapMetrics

Find and Quantify Overlap within a 1D Sequence
rgb2munsell

sRGB to Munsell Color Conversion
sp1

Soil Profile Data Example 1
show

SoilProfileCollection show method
[,SoilProfileCollection-method

Matrix/data.frame-like access to profiles and horizons in a SoilProfileCollection
parseMunsell

Parse Munsell Color Notation
simulateColor

Simulate Soil Colors
restrictions,SoilProfileCollection-method

Retrieve restriction data from SoilProfileCollection
subsetHz,SoilProfileCollection-method

Subset the horizons in a SoilProfileCollection using logical criteria
hzDepthTests

Tests of horizon depth logic
huePosition

Munsell Hue Reference and Position Searching
max,SoilProfileCollection-method

Get the maximum bottom depth in a SoilProfileCollection
profileGroupLabels

Soil Profile Group Labels
pms.munsell.lut

Pantone Colors / Munsell Lookup Table
mollic.thickness.requirement

Calculate the minimum thickness requirement for Mollic epipedon
transform,SoilProfileCollection-method

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

Combine a list of SoilProfileCollection objects
profileApply

Iterate over profiles in a SoilProfileCollection
site,SoilProfileCollection-method

Retrieve site data from SoilProfileCollection
munsell

Munsell to sRGB Lookup Table for Common Soil Colors
pc

Numerical Soil Profile Comparison
replaceHorizons<-

Replace data in the horizon slot
mutate_profile

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

Convert reflectance spectra to closest Munsell chip
spc2mpspline,SoilProfileCollection-method

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

Quickly assess relative state of site and horizon slots
thompson.bell.darkness

Thompson-Bell (1996) Index
repairMissingHzDepths

Repair Problematic Lower Horizon Depths
traditionalColorNames

Traditional Soil Color Names
perturb

Perturb soil horizon depths using boundary distinctness
previewColors

Preview Colors
split,SoilProfileCollection-method

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

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

Soil Chemical Data from Serpentinitic Soils of California
slicedHSD

Tukey's HSD Over Slices
restrictions<-

Add data to the restrictions slot
segment

Segmenting of Soil Horizon Data by Depth Interval
subsetProfiles

DEPRECATED use subset
huePositionCircle

Visual Description of Munsell Hue Ordering
guessGenHzLevels

Guess Appropriate Ordering for Generalized Horizon Labels
shannonEntropy

Shannon Entropy
horizons,SoilProfileCollection-method

Retrieve horizon data from SoilProfileCollection
validSpatialData,SoilProfileCollection-method

Get names of columns in site table
spectral.reference

Standard Illuminants and Observers
textureTriangleSummary

Soil Texture Low-RV-High as Defined by Quantiles
hurst.redness

Hurst (1977) Redness Index
names,SoilProfileCollection-method

Get names of columns in site and horizons table
unroll

Unroll Genetic Horizons
us.state.soils

US State Soils
proj4string,SoilProfileCollection-method

Set PROJ4 string for the SoilProfileCollection
munsellHuePosition

Munsell Hue Position Reference
summarizeSPC

Perform summaries on groups (from group_by) and create new site or horizon level attributes
nrow,SoilProfileCollection-method

Get the number of horizons in a SoilProfileCollection
proj4string<-,SoilProfileCollection,ANY-method

Set PROJ4 string for the SoilProfileCollection
soilPalette

Soil Color Palette
rowley2019

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

Soil Physical and Chemical Data Related to Studies in the Sierra Nevada Mountains, CA, USA.
sp5

Sample Soil Database #5
soilColorSignature

Soil Profile Color Signatures
tauW

Compute weighted naive and tau statistics for a cross-classification matrix
unique,SoilProfileCollection-method

Uniqueness within a SoilProfileCollection via MD5 Hash
sp6

Soil Physical and Chemical Data from Manganiferous Soils