Learn R Programming

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

aqp (version 1.30)

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

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Dylan Beaudette

Last Published

July 27th, 2021

Functions in aqp (1.30)

alignTransect

Calculate Relative Positions from Transect Data
allocate

Allocate soil properties within various classification systems.
depthOf

Get top or bottom depths of horizons matching a regular expression pattern
.as.data.frame.aqp

Wrapper method for data.frame subclass conversion
addBracket

Add Depth Brackets
bootstrapSoilTexture

Bootstrap Soil Texture Data
SoilTextureLevels

Ranking Systems for USDS Soil Texture Classes
denormalize

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

Multinominal Brier Score
.HSD

.HSD
contrastClass

Soil Color Contrast
getCambicBounds

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

Estimate upper and lower boundary of argillic diagnostic subsurface horizon
evalGenHZ

Evaluate Generalized Horizon Labels
estimateSoilDepth

Estimate Soil Depth
get.ml.hz

Determine ML Horizon Boundaries
get.increase.matrix

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

Probabalistic Estimation of Soil Depth within Groups
groupedProfilePlot

Grouped Soil Profile Plot
ROSETTA.centroids

Average Hydraulic Parameters from the ROSETTA Model by USDA Soil Texture Class
coordinates,SoilProfileCollection-method

Get coordinates from spatial slot
argillic.clay.increase.depth

Return upper boundary of argillic horizon
barron.torrent.redness.LAB

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

Confusion Index
checkHzDepthLogic

Check a SoilProfileCollection object for errors in horizon depths.
buntley.westin.index

Buntley-Westin (1965) Index
ca630

Soil Data from the Central Sierra Nevada Region of California
c,SoilProfileCollection-method

Combine SoilProfileCollection objects
compositeSPC

Return a list representation of site and horizon level data
contrastChart

Color Contrast Chart
HzDepthLogicSubset

Subset SoilProfileCollection Objects or Horizons via checkHzDepthLogic
dice

Efficient Slicing of SoilProfileCollection Objects
diagnostic_hz,SoilProfileCollection-method

Retrieve diagnostic data from SoilProfileCollection
getClosestMunsellChip

Get Approximate Munsell Chip
[[

Get column of horizon or site data in a SoilProfileCollection
duplicate

Duplicte Profiles of a SoilProfileCollection
L1_profiles

Create Representative Soil Profiles via L1 Estimator
checkSPC

Test for a valid SoilProfileCollection
explainPlotSPC

Visual Explanation for plotSPC
evalMissingData

Evaluate Missing Data
guessGenHzLevels

Guess Appropriate Ordering for Generalized Horizon Labels
getLastHorizonID

Get IDs of Deepest Horizons by Profile
correctAWC

Apply rock fragment or salt correction to available water content
generalize.hz

Generalize Horizon Names
$<-

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

Return a vector of contributing fractions over a depth interval
crit.clay.argillic

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

Get horizon designation column name
guessHzTexClName

Guess Horizon Texture Class Column Name
getSurfaceHorizonDepth

Determine thickness of horizons (continuous from surface) matching a pattern
get.increase.depths

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

Generate Soil Depth Class Matrix
depth_units,SoilProfileCollection-method

Get depth units from metadata
$

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

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

Algorithms for Quantitative Pedology
harden.rubification

Harden (1982) Rubification
.parseGrouped_formula

.parseHSD_formula
harden.melanization

Harden (1982) Melanization
[[<-

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

Convert Horizon Boundary Distinctness to Vertical Offset
fillHzGaps

Find and Fill Horizon Gaps
f.noise

Example Objective Function for Full-Pattern Matching
horizons,SoilProfileCollection-method

Retrieve horizon data from SoilProfileCollection
harmonize,SoilProfileCollection-method

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

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

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

Munsell Hue Position for Soil Color Description
invertLabelColor

Make High Contrast Label Colors
hzID<-,SoilProfileCollection-method

Set horizon IDs
horizonColorIndices

Horizon Color Indices
horizonDepths<-

Set horizon depth column names
as

Coerce SoilProfileCollection with as()
hzTopographyCodeToOffset

Convert Horizon Boundary Topography to Vertical Offset
mixMunsell

Mix Munsell Colors via Spectral Library
hzTransitionProbabilities

Horizon Transition Probabilities
jacobs2000

Soil Morphologic Data from Jacobs et al. 2002.
mollic.thickness.requirement

Calculate the minimum thickness requirement for Mollic epipedon
pbindlist

Combine a list of SoilProfileCollection objects
munsell

Munsell to sRGB Lookup Table for Common Soil Colors
profileApply

Iterate over profiles in a SoilProfileCollection
previewColors

Preview Colors
horizonNames<-

Set horizon column names
.makeEquivalentMunsellLUT

.makeEquivalentMunsellLUT
colorContrast

Metrics of Contrast Suitable for Comparing Soil Colors
munsell.spectra

Spectral Library of Munsell Colors
depths<-,SoilProfileCollection-method

Initialize a SoilProfileCollection from a data.frame object
pc

Numerical Soil Profile Comparison
equivalentMunsellChips

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

Get the maximum bottom depth in a SoilProfileCollection
munsell2rgb

Convert Munsell Color Notation to other Color Space Coordinates (sRGB and CIELAB)
plotColorQuantiles

Visualize Color Quantiles
metadata,SoilProfileCollection-method

Retrieve metadata from SoilProfileCollection
hzTopographyCodeToLineType

Convert Horizon Boundary Topography to Line Type
diagnostic_hz<-

Add data to the diagnostic slot
hzidname<-

Set horizon ID column name
munsell2spc,SoilProfileCollection-method

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

Perturb soil horizon depths using boundary distinctness
estimateAWC

Estimate available water capacity for fine-earth fraction
estimatePSCS

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

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

Visualize Spectral Mixing of Munsell Colors
hztexclname<-

Set horizon texture class column name
lunique

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

Get the number of profiles in a SoilProfileCollection
plotMultipleSPC

Plot Multiple SoilProfileCollection Objects
mutate_profile

Transform a SPC (by profile) with a set of expressions
proj4string,SoilProfileCollection-method

Set PROJ4 string for the SoilProfileCollection
names,SoilProfileCollection-method

Get names of columns in site and horizons table
groupSPC

(EXPERIMENTAL) Store groupings within a profile collection.
random_profile

Random Profile
replaceHorizons<-

Replace data in the horizon slot
findOverlap

Find Overlap within a Sequence
fixOverlap

Fix Overlap within a Sequence via Simulated Annealing
equivalent_munsell

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

Shannon Entropy
show

SoilProfileCollection show method
glom,SoilProfileCollection-method

Subset soil horizon data using a depth or depth interval
glomApply

Subset an SPC by applying glom to each profile
plot_distance_graph

Between Individual Distance Plot
resample.twotheta

Resample an XRD Pattern
guessHzAttrName

Guess Arbitrary Horizon Column Name
sp1

Soil Profile Data Example 1
sp2

Honcut Creek Soil Profile Data
rebuildSPC

Rebuild a SoilProfileCollection object
[,SoilProfileCollection-method

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

Set PROJ4 string for the SoilProfileCollection
guessHzDesgnName

Guess Horizon Designation Column Name
pms.munsell.lut

Pantone Colors / Munsell Lookup Table
rruff.sample

Sample XRD Patterns
segment

Segmenting of Soil Horizon Data by Depth Interval
siteNames<-

Set site column names
site,SoilProfileCollection-method

Retrieve site data from SoilProfileCollection
hzdesgnname,SoilProfileCollection-method

Get horizon designation column name
slab-methods

Slab-Wise Aggregation of SoilProfileCollection Objects
hzdesgnname<-

Set horizon designation column name
split,SoilProfileCollection-method

Split a SoilProfileCollection object into a list of SoilProfileCollection objects.
min,SoilProfileCollection-method

Get the minimum bottom depth in a SoilProfileCollection
splitLogicErrors

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

Missing Data Grid
hurst.redness

Hurst (1977) Redness Index
spc2mpspline,SoilProfileCollection-method

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

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

Retrieve restriction data from SoilProfileCollection
restrictions<-

Add data to the restrictions slot
slicedHSD

Tukey's HSD Over Slices
slice-methods

Slicing of SoilProfileCollection Objects
thompson.bell.darkness

Thompson-Bell (1996) Index
hztexclname,SoilProfileCollection-method

Get horizon texture class column name
hzDepthTests

Tests of horizon depth logic
spc_in_sync

Quickly assess relative state of site and horizon slots
traditionalColorNames

Traditional Soil Color Names
idname,SoilProfileCollection-method

Get profile ID column name
nrow,SoilProfileCollection-method

Get the number of horizons in a SoilProfileCollection
parseMunsell

Parse Munsell Color Notation
panel.depth_function

Lattice Panel Function for Soil Profiles
profileGroupLabels

Soil Profile Group Labels
xtableTauW

Format a LaTeX table with results
overlapMetrics

Find and Quantify Overlap within a 1D Sequence
textureTriangleSummary

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

Textural conversions
profile_id<-

Set profile IDs
sierraTransect

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

Re-order corrupted horizon data
repairMissingHzDepths

Repair Problematic Lower Horizon Depths
sim

DEPRECATED Simulate Soil Profiles
summarizeSPC

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

sRGB to Munsell Color Conversion
spec2Munsell

Convert reflectance spectra to closest Munsell chip
soil_minerals

Munsell Colors of Common Soil Minerals
soiltexture

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

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

Compute weighted naive and tau statistics for a cross-classification matrix
spectral.reference

Standard Illuminants and Observers
soilColorSignature

Soil Profile Color Signatures
soilPalette

Soil Color Palette
sp5

Sample Soil Database #5
sp3

Soil Profile Data Example 3
sp6

Soil Physical and Chemical Data from Manganiferous Soils
subsetProfiles

DEPRECATED use subset
sp4

Soil Chemical Data from Serpentinitic Soils of California
us.state.soils

US State Soils
validSpatialData,SoilProfileCollection-method

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

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

Truncate a SoilProfileCollection to specified top and bottom depth
subset,SoilProfileCollection-method

Subset a SoilProfileCollection with logical expressions
subApply

Subset SPC based on result of performing function on each profile
transform,SoilProfileCollection-method

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

Unroll Genetic Horizons
SoilProfileCollection

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

Convert Pantone PMS codes to Munsell notation
addDiagnosticBracket

Annotate Diagnostic Features
addVolumeFraction

Symbolize Volume Fraction on a Soil Profile Collection Plot
plotSPC

Create Soil Profile Sketches
aggregateColor

Summarize Soil Colors
colorQuantiles

Soil Color Range via Quantiles
colorContrastPlot

Color Contrast Plot