Learn R Programming

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

aqp (version 1.29)

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.29

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Dylan Beaudette

Last Published

April 7th, 2021

Functions in aqp (1.29)

addBracket

Add Depth Brackets
addVolumeFraction

Symbolize Volume Fraction on a Soil Profile Collection Plot
plotSPC

Create Soil Profile Sketches
SoilTextureLevels

Ranking Systems for USDS Soil Texture Classes
aggregateColor

Summarize Soil Colors
L1_profiles

Create Representative Soil Profiles via L1 Estimator
HzDepthLogicSubset

Subset SoilProfileCollection Objects or Horizons via checkHzDepthLogic
addDiagnosticBracket

Annotate Diagnostic Features
ROSETTA.centroids

Average Hydraulic Parameters from the ROSETTA Model by USDA Soil Texture Class
barron.torrent.redness.LAB

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

Probabalistic Estimation of Soil Depth within Groups
brierScore

Multinominal Brier Score
alignTransect

Calculate Relative Positions from Transect Data
buntley.westin.index

Buntley-Westin (1965) Index
colorContrastPlot

Color Contrast Plot
colorContrast

Metrics of Contrast Suitable for Comparing Soil Colors
depthOf

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

Return a vector of contributing fractions over a depth interval
ca630

Soil Data from the Central Sierra Nevada Region of California
checkHzDepthLogic

Check a SoilProfileCollection object for errors in horizon depths.
aqp_df_class

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

Bootstrap Soil Texture Data
depth_units

Get depth units from metadata
depths<-,SoilProfileCollection-method

Initialize a SoilProfileCollection from a data.frame object
argillic.clay.increase.depth

Return upper boundary of argillic horizon
diagnostic_hz<-

Add data to the diagnostic slot
SoilProfileCollection

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

Coerce SoilProfileCollection with as()
contrastClass

Soil Color Contrast
checkSPC

Test for a valid SoilProfileCollection
confusionIndex

Confusion Index
compositeSPC

Return a list representation of site and horizon level data
contrastChart

Color Contrast Chart
$<-

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

Efficient Slicing of SoilProfileCollection Objects
estimatePSCS

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

Get coordinates from spatial slot
correctAWC

Apply rock fragment or salt correction to available water content
$

Get data from column of horizon or site data in a SoilProfileCollection
.HSD

.HSD
allocate

Allocate soil properties within various classification systems.
explainPlotSPC

Visual Explanation for plotSPC
estimateSoilDepth

Estimate Soil Depth
aqp-package

Algorithms for Quantitative Pedology
colorQuantiles

Soil Color Range via Quantiles
getLastHorizonID

Get IDs of Deepest Horizons by Profile
getArgillicBounds

Estimate upper and lower boundary of argillic diagnostic subsurface horizon
diagnostic_hz

Retrieve diagnostic data from SoilProfileCollection
duplicate

Duplicte Profiles of a SoilProfileCollection
equivalentMunsellChips

Identify "equivalent" (whole number value/chroma) Munsell chips
c,SoilProfileCollection-method

Combine SoilProfileCollection objects
get.ml.hz

Determine ML Horizon Boundaries
crit.clay.argillic

Determines threshold (minimum) clay content for argillic upper bound
.as.data.frame.aqp

Wrapper method for data.frame subclass conversion
.makeEquivalentMunsellLUT

.makeEquivalentMunsellLUT
f.noise

Example Objective Function for Full-Pattern Matching
get.increase.depths

Return the horizon top depths from a call to get.increase.matrix()
[[<-

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

Get column of horizon or site data in a SoilProfileCollection
denormalize

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

Subset an SPC by applying glom to each profile
get.increase.matrix

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

Set horizon IDs
groupSPC

(EXPERIMENTAL) Store groupings within a profile collection.
getSoilDepthClass

Generate Soil Depth Class Matrix
hzDistinctnessCodeToOffset

Convert Horizon Boundary Distinctness to Vertical Offset
hzdesgnname<-

Set horizon designation column name
equivalent_munsell

Indices of "equivalent" Munsell chips in munsell data set
fixOverlap

Fix Overlap within a Sequence via Simulated Annealing
estimateAWC

Estimate available water capacity for fine-earth fraction
.data_dots

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

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

.parseHSD_formula
harmonize,SoilProfileCollection-method

Harmonize a property by profile-level denormalization for convenient visualization or analysis of ranges
hasDarkColors

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

Grouped Soil Profile Plot
fillHzGaps

Find and Fill Horizon Gaps
grepSPC

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

Mix Munsell Colors via Spectral Library
hzdesgnname

Get horizon designation column name
evalGenHZ

Evaluate Generalized Horizon Labels
evalMissingData

Evaluate Missing Data
hzDepthTests

Tests of horizon depth logic
mollic.thickness.requirement

Calculate the minimum thickness requirement for Mollic epipedon
pbindlist

Combine a list of SoilProfileCollection objects
generalize.hz

Generalize Horizon Names
guessGenHzLevels

Guess Appropriate Ordering for Generalized Horizon Labels
horizonDepths<-

Set horizon depth column names
hzTopographyCodeToLineType

Convert Horizon Boundary Topography to Line Type
horizonColorIndices

Horizon Color Indices
hzID

Get horizon IDs
guessHzAttrName

Guess Arbitrary Horizon Column Name
hurst.redness

Hurst (1977) Redness Index
huePosition

Munsell Hue Position for Soil Color Description
hzTopographyCodeToOffset

Convert Horizon Boundary Topography to Vertical Offset
hzTransitionProbabilities

Horizon Transition Probabilities
findOverlap

Find Overlap within a Sequence
pc

Numerical Soil Profile Comparison
metadata

Retrieve metadata from SoilProfileCollection
max

Get the maximum bottom depth in a SoilProfileCollection
munsell2rgb

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

Subset soil horizon data using a depth or depth interval
guessHzDesgnName

Guess Horizon Designation Column Name
plot_distance_graph

Between Individual Distance Plot
invertLabelColor

Make High Contrast Label Colors
pms.munsell.lut

Pantone Colors / Munsell Lookup Table
munsell.spectra

Spectral Library of Munsell Colors
munsell

Munsell to sRGB Lookup Table for Common Soil Colors
jacobs2000

Soil Morphologic Data from Jacobs et al. 2002.
hzDesgn

Get horizon designation column name
proj4string<-,SoilProfileCollection,ANY-method

Set PROJ4 string for the SoilProfileCollection
proj4string,SoilProfileCollection-method

Set PROJ4 string for the SoilProfileCollection
soilColorSignature

Soil Profile Color Signatures
soilPalette

Soil Color Palette
textureTriangleSummary

Soil Texture Low-RV-High as Defined by Quantiles
panel.depth_function

Lattice Panel Function for Soil Profiles
thompson.bell.darkness

Thompson-Bell (1996) Index
idname

Get profile ID column name
hztexclname

Get horizon texture class column name
min

Get the minimum bottom depth in a SoilProfileCollection
overlapMetrics

Find and Quantify Overlap within a 1D Sequence
nrow

Get the number of horizons in a SoilProfileCollection
missingDataGrid

Missing Data Grid
getClosestMunsellChip

Get Approximate Munsell Chip
getCambicBounds

Find all intervals that are potentially part of a Cambic horizon
harden.melanization

Harden (1982) Melanization
guessHzTexClName

Guess Horizon Texture Class Column Name
horizonNames<-

Set horizon column names
parseMunsell

Parse Munsell Color Notation
horizons

Retrieve horizon data from SoilProfileCollection
munsell2spc,SoilProfileCollection-method

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

Random Profile
profileGroupLabels

Soil Profile Group Labels
harden.rubification

Harden (1982) Rubification
rebuildSPC

Rebuild a SoilProfileCollection object
profile_id<-

Set profile IDs
hztexclname<-

Set horizon texture class column name
length

Get the number of profiles in a SoilProfileCollection
hzidname<-

Set horizon ID column name
plotColorQuantiles

Visualize Color Quantiles
lunique

Eliminate duplicate instances of profile IDs in a list of SoilProfileCollections
[,SoilProfileCollection-method

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

Iterate over profiles in a SoilProfileCollection
sim

DEPRECATED Simulate Soil Profiles
sierraTransect

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

Replace data in the horizon slot
previewColors

Preview Colors
reorderHorizons

Re-order corrupted horizon data
plotMultipleSPC

Plot Multiple SoilProfileCollection Objects
resample.twotheta

Resample an XRD Pattern
soiltexture

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

Munsell Colors of Common Soil Minerals
mutate_profile

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

Perturb soil horizon depths using boundary distinctness
plotColorMixture

Visualize Spectral Mixing of Munsell Colors
names

Get names of columns in site and horizons table
restrictions<-

Add data to the restrictions slot
shannonEntropy

Shannon Entropy
slice-methods

Slicing of SoilProfileCollection Objects
show

SoilProfileCollection show method
repairMissingHzDepths

Repair Problematic Lower Horizon Depths
sp5

Sample Soil Database #5
sp6

Soil Physical and Chemical Data from Manganiferous Soils
slicedHSD

Tukey's HSD Over Slices
site

Retrieve site data from SoilProfileCollection
sp1

Soil Profile Data Example 1
restrictions

Retrieve restriction data from SoilProfileCollection
sp3

Soil Profile Data Example 3
siteNames<-

Set site column names
rgb2munsell

sRGB to Munsell Color Conversion
rowley2019

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

Sample XRD Patterns
transform,SoilProfileCollection-method

Transform a SPC with expressions based on site or horizon level attributes
trunc,SoilProfileCollection-method

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

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

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

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

Soil Chemical Data from Serpentinitic Soils of California
splitLogicErrors

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

Honcut Creek Soil Profile Data
texcl_to_ssc

Textural conversions
segment

Segmenting of Soil Horizon Data by Depth Interval
xtableTauW

Format a LaTeX table with results
summarizeSPC

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

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

Get names of columns in site table
subset,SoilProfileCollection-method

Subset a SoilProfileCollection with logical expressions
subsetProfiles

DEPRECATED use subset
us.state.soils

US State Soils
unique

Get the indexes of unique profiles in a SoilProfileCollection
spc_in_sync

Quickly assess relative state of site and horizon slots
spc2mpspline,SoilProfileCollection-method

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

Unroll Genetic Horizons