Learn R Programming

aqp (version 2.1.0)

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

Version

2.1.0

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

October 19th, 2024

Functions in aqp (2.1.0)

SoilProfileCollection

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

Subset SoilProfileCollection Objects or Horizons via checkHzDepthLogic
SPC.with.overlap

Example SoilProfileCollection with Overlapping Horizons
SANN_1D

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

Get or Set Coordinate Reference System for SoilProfileCollection
GHL

Get or Set Generalized Horizon Label (GHL) Column Name
ROSETTA.centroids

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

Numerical Classification of Soil Profiles
plotSPC

Create Soil Profile Sketches
addVolumeFraction

Symbolize Volume Fraction within a Soil Profile Collection Plot
aggregateColor

Summarize Soil Colors
addDiagnosticBracket

Annotate Diagnostic Features
aggregateSoilDepth

Probabilistic Estimation of Soil Depth within Groups
SoilTextureLevels

Ranking Systems for USDA Soil Texture Classes
aqp-package

Algorithms for Quantitative Pedology
accumulateDepths

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

Calculate Relative Positions from Transect Data
addBracket

Add Depth Brackets
allocate

Allocate soil properties within various classification systems.
buntley.westin.index

Buntley-Westin (1965) Index
checkHzDepthLogic

Check a SoilProfileCollection object for errors in horizon depths.
bootstrapSoilTexture

Bootstrap Soil Texture Data
barron.torrent.redness.LAB

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

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

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

Test for a valid SoilProfileCollection
as

Coerce SoilProfileCollection with as()
brierScore

Multinominal Brier Score
argillic.clay.increase.depth

Return upper boundary of argillic horizon
colorContrastPlot

Color Contrast Plot
colorChart

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

Metrics of Contrast Suitable for Comparing Soil Colors
collapseHz

Collapse Horizons within Profiles Based on Pattern Matching
col2Munsell

Convert colors into Munsell Notation
denormalize

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

Get top or bottom depths of horizons matching a regular expression pattern
diagnostic_hz,SoilProfileCollection-method

Get or Set Diagnostic Horizon data in a SoilProfileCollection
depths

Initialize a SoilProfileCollection from data.frame
compositeSPC

Return a list representation of site and horizon level data
confusionIndex

Confusion Index
correctAWC

Apply rock fragment or salt correction to available water content
crit.clay.argillic

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

Label placement based on a simulation of electrostatic forces
estimateAWC

Estimate available water capacity for fine-earth fraction
equivalent_munsell

Indices of "equivalent" Munsell chips in the munsell data set
dice,SoilProfileCollection-method

Efficient Slicing of SoilProfileCollection Objects
$<-

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

Soil Color Range via Quantiles
contrastClass

Soil Color Contrast
depthWeights

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

Get depth units from metadata
flagOverlappingHz

Flag perfectly overlapping horizons within a SoilProfileCollection
equivalentMunsellChips

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

Color Contrast Chart
c,SoilProfileCollection-method

Combine SoilProfileCollection objects
compareSites

Compare Site Level Attributes of a SoilProfileCollection
$

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

Evaluate Missing Data within a SoilProfileCollection
explainPlotSPC

Visual Explanation for plotSPC
[[<-

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

Find and Fill Horizon Gaps
fixOverlap

Fix Overlap within a Sequence
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 of Soil Properties over Depth
getClosestMunsellChip

Get Approximate Munsell Chip
getLastHorizonID

Get IDs of Deepest Horizons by Profile
estimatePSCS

Estimate boundaries of the U.S Soil Taxonomy Particle Size Control Section
fragmentSieve

Sieve the Coarse Fraction of Soil
[[

Get column of horizon or site data in a SoilProfileCollection
genSlabLabels

Generate Labels for Slabs
estimateSoilColor

Estimate dry soil colors from moist soil colors and vice versa.
getCambicBounds

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

Duplicate Profiles of a SoilProfileCollection
generalize.hz

Generalize Horizon Names
genhzTableToAdjMat

Convert cross-tabulation to adjacency matrix.
glom,SoilProfileCollection-method

Subset soil horizon data using a depth or depth interval
glomApply

Subset an SPC by applying glom to each profile
guessHzAttrName

Guess Horizon Slot Column Names
harden.melanization

Harden (1982) Melanization
groupSPC

Store groupings within a profile collection.
fragmentClasses

Coarse Fragment Class Labels and Diameter
hasDarkColors

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

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

Generate Soil Depth Class Matrix
getSurfaceHorizonDepth

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

Munsell Hue Reference and Position Searching
horizons,SoilProfileCollection-method

Retrieve horizon data from SoilProfileCollection
horizonNames<-

Set horizon column names
horizonDepths<-

Set horizon depth column names
hzTopographyCodeToOffset

Convert Horizon Boundary Topography to Vertical Offset
hzTopographyCodeToLineType

Convert Horizon Boundary Topography to Line Type
guessGenHzLevels

Guess Appropriate Ordering for Generalized Horizon Labels
groupedProfilePlot

Grouped Soil Profile Plot
hz_dissolve

Dissolving horizon boundaries by grouping variables
hzDepthTests

Tests of horizon depth logic
hzDesgn,SoilProfileCollection-method

Get horizon designation column name
horizonColorIndices

Horizon Color Indices
hzTransitionProbabilities

Horizon Transition Probabilities
harden.rubification

Harden (1982) Rubification
harmonize,SoilProfileCollection-method

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

Visual Description of Munsell Hue Ordering
idname,SoilProfileCollection-method

Get profile ID column name
hzAbove

Horizons Above or Below
hzdesgnname

Get or Set Horizon Designation Column Name
hz_intersect

Intersecting horizon boundaries by horizon depths
hzMetadata,SoilProfileCollection-method

Get horizon-level metadata
hz_lag

Find lagged horizon values
hurst.redness

Hurst (1977) Redness Index
hzID<-,SoilProfileCollection-method

Set horizon IDs
jacobs2000

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

Get the number of profiles in a SoilProfileCollection
isEmpty,SoilProfileCollection-method

Check for "empty" profiles in a SoilProfileCollection
hz_segment

Segmenting of Soil Horizon Data by Depth Interval
invertLabelColor

Make High Contrast Label Colors
hz_to_taxpartsize

Allocate Particle Size Class for the Control Section.
munsell2rgb

Convert Munsell Color Notation to other Color Space Coordinates (sRGB and CIELAB)
hzidname<-

Set horizon ID column name
mollic.thickness.requirement

Calculate the minimum thickness requirement for Mollic epipedon
mixMunsell

Mix Munsell Colors via Spectral Library
lookup_taxpartsize

Ranking Systems for USDA Taxonomic Particle-Size and Substitute Classes of Mineral Soils
lunique

Eliminate duplicate instances of profile IDs in a list of SoilProfileCollections
hzDistinctnessCodeToOffset

Convert Horizon Boundary Distinctness to Vertical Offset
hzmetaname

Get or Set Horizon Metadata Column Name
panel.depth_function

Lattice Panel Function for Soil Profiles
parseMunsell

Parse Munsell Color Notation
min,SoilProfileCollection-method

Get the minimum bottom depth in a SoilProfileCollection
osd

Example Output from soilDB::fetchOSD()
munsell2spc,SoilProfileCollection-method

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

Get or Set Horizon Texture Class Column Name
munsell

Munsell to sRGB Lookup Table for Common Soil Colors
munsell.spectra

Spectral Library of Munsell Colors
missingDataGrid

Missing Data Grid
findOverlap

Find Overlap within a Sequence
pbindlist

Combine a list of SoilProfileCollection objects
perturb

Perturb soil horizon depths using boundary distinctness
initSpatial<-

Initialize Spatial Data in a SoilProfileCollection
random_profile

Random Profile
profileGroupLabels

Soil Profile Group Labels
quickSPC

Quickly Assemble a SoilProfileCollection
profile_id<-

Set profile IDs
munsellHuePosition

Munsell Hue Position Reference
rgb2munsell

sRGB to Munsell Color Conversion
ph_to_rxnclass

Convert pH to/from Reaction Classes
pc

Deprecated: Numerical Soil Profile Comparison
replaceHorizons<-

Replace Data in Horizon Slot
max,SoilProfileCollection-method

Get the maximum bottom depth in a SoilProfileCollection
restrictions,SoilProfileCollection-method

Get or Set Restriction data in a SoilProfileCollection
rowley2019

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

pH Reaction Classes
metadata,SoilProfileCollection-method

Retrieve metadata from SoilProfileCollection
mutate_profile

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

Slab-Wise Aggregation of SoilProfileCollection Objects
slice-methods

Slicing of SoilProfileCollection Objects
slicedHSD

Tukey's HSD Over Slices
names,SoilProfileCollection-method

Get names of columns in site and horizons table
nrow,SoilProfileCollection-method

Get the number of horizons in a SoilProfileCollection
plotColorMixture

Visualize Spectral Mixing of Munsell Colors
subApply

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

Retrieve site data from SoilProfileCollection
siteNames<-

Set site column names
sp4

Soil Chemical Data from Serpentinitic Soils of California
plotColorQuantiles

Visualize Color Quantiles
soilColorSignature

Soil Profile Color Signatures
previewColors

Preview Colors
subset,SoilProfileCollection-method

Subset a SoilProfileCollection with logical expressions
sp3

Soil Profile Data Example 3
spectral.reference

Standard Illuminants and Observers
plotMultipleSPC

Plot Multiple SoilProfileCollection Objects
thicknessOf

Calculate Thickness of Horizons Matching Logical Criteria
spec2Munsell

Convert reflectance spectra to closest Munsell chip
profileInformationIndex

Soil Profile Information Index
repairMissingHzDepths

Repair Problematic Lower Horizon Depths
thompson.bell.darkness

Thompson-Bell (1996) Index
plot_distance_graph

Between Individual Distance Plot
reorderHorizons

Re-order corrupted horizon data
sierraTransect

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

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

Soil Profile Data Example 1
profileApply

Iterate over profiles in a SoilProfileCollection
soilTextureColorPal

Soil Texture Color Palettes
soilPalette

Soil Color Palette
sp6

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

Subset the horizons in a SoilProfileCollection using logical criteria
sim

DEPRECATED Simulate Soil Profiles
subsetProfiles

DEPRECATED use subset
summarizeSPC

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

Honcut Creek Soil Profile Data
sp5

Sample Soil Database #5
traditionalColorNames

Traditional Soil Color Names
validSpatialData,SoilProfileCollection-method

Check for valid spatial reference of profiles
us.state.soils

US State Soils
xtableTauW

Format a LaTeX table with results
spc2mpspline,SoilProfileCollection-method

SoilProfileCollection wrapper for mpspline2::mpspline()
spc_in_sync

Quickly assess relative state of site and horizon slots
tauW

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

Select a subset of columns from a SoilProfileCollection
shannonEntropy

Shannon Entropy
texcl_to_ssc

Textural conversions
rebuildSPC

Rebuild a SoilProfileCollection object
split,SoilProfileCollection-method

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

Inflate / Deflate Horizon Thickness
show

SoilProfileCollection show method
wilson2022

Example Data from Wilson et al. 2022
splitLogicErrors

Split a SoilProfileCollection into a list based on types of horizon logic errors
unique,SoilProfileCollection-method

Uniqueness within a SoilProfileCollection via MD5 Hash
unroll

Unroll Genetic Horizons
textureTriangleSummary

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

Simulate Soil Colors
soil_minerals

Munsell Colors of Common Soil Minerals
[,SoilProfileCollection-method

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

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

Create Representative Soil Profiles via L1 Estimator