Learn R Programming

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

aqp (version 1.27)

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

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Dylan Beaudette

Last Published

January 26th, 2021

Functions in aqp (1.27)

addDiagnosticBracket

Annotate Diagnostic Features
SoilTextureLevels

Generate a vector of USDA soil texture codes or class names, sorted according to approximate particle size
aggregateColor

Summarize Soil Colors
addVolumeFraction

Symbolize Volume Fraction on a Soil Profile Collection Plot
SoilProfileCollection

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

Create Soil Profile Sketches
addBracket

Add Depth Brackets
L1_profiles

Create Representative Soil Profiles via L1 Estimator
aggregateSoilDepth

Probabalistic Estimation of Soil Depth within Groups
ROSETTA.centroids

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

Multinominal Brier Score
compositeSPC

Return a list representation of site and horizon level data
aqp_df_class

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

Check a SoilProfileCollection object for errors in horizon depths.
ca630

Soil Data from the Central Sierra Nevada Region of California
bootstrapSoilTexture

Bootstrap Soil Texture Data
barron.torrent.redness.LAB

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

Soil Color Range via Quantiles
buntley.westin.index

Buntley-Westin (1965) Index
argillic.clay.increase.depth

Return upper boundary of argillic horizon
depthWeights

Return a vector of contributing fractions over a depth interval
checkSPC

Test for a valid SoilProfileCollection
contrastChart

Color Contrast Chart
allocate

Allocate soil properties within various classification systems.
denormalize

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

Coerce SoilProfileCollection with as()
contrastClass

Soil Color Contrast
confusionIndex

Confusion Index
depths<-,SoilProfileCollection-method

Initialize a SoilProfileCollection from a data.frame object
equivalentMunsellChips

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

Get top or bottom depths of horizons matching a regular expression pattern
aqp-package

Algorithms for Quantitative Pedology
depth_units

Get depth units from metadata
equivalent_munsell

Indices of "equivalent" Munsell chips in munsell data set
.parseGrouped_formula

.parseHSD_formula
combine,SoilProfileCollection-method

Combine SoilProfileCollection objects
getClosestMunsellChip

Get Approximate Munsell Chip
guessHzAttrName

Guess Arbitrary Horizon Column Name
guessHzDesgnName

Guess Horizon Designation Column Name
getCambicBounds

Find all intervals that are potentially part of a Cambic horizon
mollic.thickness.requirement

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

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

Munsell to sRGB Lookup Table for Common Soil Colors
diagnostic_hz<-

Add data to the diagnostic slot
colorContrast

Metrics of Contrast Suitable for Comparing Soil Colors
coordinates

Get coordinates from spatial slot
colorContrastPlot

Color Contrast Plot
[[

Get column of horizon or site data in a SoilProfileCollection
groupedProfilePlot

Grouped Soil Profile Plot
glomApply

Subset an SPC by applying glom to each profile
glom,SoilProfileCollection-method

Subset soil horizon data using a depth or depth interval
[[<-

Add or change column of horizon or site data in a SoilProfileCollection
get.increase.matrix

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

Duplicte Profiles of a SoilProfileCollection
explainPlotSPC

Visual Explanation for plotSPC
crit.clay.argillic

Determines threshold (minimum) clay content for argillic upper bound
get.increase.depths

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

Retrieve diagnostic data from SoilProfileCollection
mutate

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

.HSD
$

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

Evaluate Generalized Horizon Labels
$<-

Set data in column of horizon or site data in a SoilProfileCollection
.makeEquivalentMunsellLUT

.makeEquivalentMunsellLUT
generalize.hz

Generalize Horizon Names
.as.data.frame.aqp

Wrapper method for data.frame subclass conversion
findOverlap

Establish which elements within a vector of horizontal positions overlap beyond a given threshold
harden.rubification

Harden (1982) Rubification
harmonize,SoilProfileCollection-method

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

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

Estimate Soil Depth
getSoilDepthClass

Generate Soil Depth Class Matrix
permute_profile

Permute soil horizon depths using boundary distinctness
pc

Numerical Soil Profile Comparison
rebuildSPC

Rebuild a SoilProfileCollection object
reorderHorizons

Re-order corrupted horizon data
hurst.redness

Hurst (1977) Redness Index
hzDepthTests

Tests of horizon depth logic
shannonEntropy

Shannon Entropy
show

SoilProfileCollection show method
sp1

Soil Profile Data Example 1
hztexclname<-

Set horizon texture class column name
f.noise

Example Objective Function for Full-Pattern Matching
evalMissingData

Evaluate Missing Data
getSurfaceHorizonDepth

Determine thickness of horizons (continuous from surface) matching a pattern
get.ml.hz

Determine ML Horizon Boundaries
nrow

Get the number of horizons in a SoilProfileCollection
hztexclname

Get horizon texture class column name
getArgillicBounds

Estimate upper and lower boundary of argillic diagnostic subsurface horizon
hzDesgn

Get horizon designation column name
hzDistinctnessCodeToOffset

Convert Horizon Boundary Distinctness to Vertical Offset
hzdesgnname<-

Set horizon designation column name
grepSPC

Subset SPC with pattern-matching for text-based attributes
panel.depth_function

Lattice Panel Function for Soil Profiles
hzTransitionProbabilities

Horizon Transition Probabilities
plotMultipleSPC

Plot Multiple SoilProfileCollection Objects
guessHzTexClName

Guess Horizon Texture Class Column Name
sp2

Honcut Creek Soil Profile Data
hzID<-

Set horizon IDs
harden.melanization

Harden (1982) Melanization
guessGenHzLevels

Guess Appropriate Ordering for Generalized Horizon Labels
horizonDepths<-

Set horizon depth column names
horizonNames<-

Set horizon column names
hzID

Get horizon IDs
idname

Get profile ID column name
hzTopographyCodeToLineType

Convert Horizon Boundary Topography to Line Type
invertLabelColor

Make High Contrast Label Colors
lunique

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

Retrieve metadata from SoilProfileCollection
plot_distance_graph

Between Individual Distance Plot
hzTopographyCodeToOffset

Convert Horizon Boundary Topography to Vertical Offset
jacobs2000

Soil Morphologic Data from Jacobs et al. 2002.
group_by

(EXPERIMENTAL) Store groupings within a profile collection.
hasDarkColors

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

Horizon Color Indices
horizons

Retrieve horizon data from SoilProfileCollection
subApply

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

Munsell Hue Position for Soil Color Description
length

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

Subset a SoilProfileCollection with logical expressions
munsell.spectra

Spectral Library of Munsell Colors
max

Get the maximum bottom depth in a SoilProfileCollection
subsetProfiles

DEPRECATED use subset
profile_id<-

Set profile IDs
summarize

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

Format a LaTeX table with results
plotColorMixture

Visualize Spectral Mixing of Munsell Colors
min

Get the minimum bottom depth in a SoilProfileCollection
mutate_profile

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

Set PROJ4 string for the SoilProfileCollection
munsell2rgb

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

Add data to the restrictions slot
plotColorQuantiles

Visualize Color Quantiles
restrictions

Retrieve restriction data from SoilProfileCollection
hzidname<-

Set horizon ID column name
hzdesgnname

Get horizon designation column name
names

Get names of columns in site and horizons table
previewColors

Preview Colors
pms.munsell.lut

Pantone Colors / Munsell Lookup Table
mixMunsell

Mix Munsell Colors via Spectral Library
parseMunsell

Parse Munsell Color Notation
profileApply

Iterate over profiles in a SoilProfileCollection
missingDataGrid

Missing Data Grid
pbindlist

Combine a list of SoilProfileCollection objects
rruff.sample

Sample XRD Patterns
profileGroupLabels

Soil Profile Group Labels
site

Retrieve site data from SoilProfileCollection
[,SoilProfileCollection-method

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

Replace data in the horizon slot
soil_minerals

Munsell Colors of Common Soil Minerals
segment

Segmenting of Soil Horizon Data by Depth Interval
unique

Get the indexes of unique profiles in a SoilProfileCollection
sp4

Soil Chemical Data from Serpentinitic Soils of California
sp3

Soil Profile Data Example 3
proj4string<-,SoilProfileCollection,ANY-method

Set PROJ4 string for the SoilProfileCollection
unroll

Unroll Genetic Horizons
random_profile

Random Profile
rgb2munsell

sRGB to Munsell Color Conversion
resample.twotheta

Resample an XRD Pattern
soilColorSignature

Soil Profile Color Signatures
soiltexture

Lookup tables for sand, silt, clay, texture class, and textural modifiers.
slice-methods

Slicing of SoilProfileCollection Objects
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
slicedHSD

Tukey's HSD Over Slices
rowley2019

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

Simulate Soil Profiles
sierraTransect

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

Soil Color Palette
sp6

Soil Physical and Chemical Data from Manganiferous Soils
sp5

Sample Soil Database #5
siteNames<-

Set site column names
slab-methods

Slab-Wise Aggregation of SoilProfileCollection Objects
thompson.bell.darkness

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

Missing-data-safe, SPC-wide wrapper around mpspline2::mpspline "continuous" 1cm output
us.state.soils

US State Soils
textureTriangleSummary

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

Quickly assess relative state of site and horizon slots
tauW

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

Get names of columns in site table
texcl_to_ssc

Textural conversions
trunc,SoilProfileCollection-method

Truncate a SoilProfileCollection to specified top and bottom depth
union,list,missing-method

(DEPRECATED) union