Learn R Programming

soilDB (version 1.7)

fetchNASIS: Fetch commonly used site/pedon/horizon data from a PedonPC database.

Description

Fetch commonly used site/pedon/horizon data from a PedonPC or local NASIS database, return as a SoilProfileCollection object.

Usage

fetchNASIS(rmHzErrors = TRUE, nullFragsAreZero=TRUE)
fetchNASIS_component_data(rmHzErrors=TRUE)
getHzErrorsNASIS(strict=TRUE)

Arguments

rmHzErrors
should pedons with horizonation errors be removed from the results? (default: TRUE)
nullFragsAreZero
should fragment volumes of NULL be interpreted as 0? (default: TRUE), see details
strict
should horizonation by strictly enforced? (TRUE)

Value

  • a SoilProfileCollection class object

Details

The value of nullFragsAreZero will have a significant impact on the rock fragment fractions returned by fetchNASIS. Set nullFragsAreZero = FALSE in those cases where there are many data-gaps and NULL rock fragment values should be interpretated as NULLs. Set nullFragsAreZero = TRUE in those cases where NULL rock fragment values should be interpreted as 0. This function attempts to do most of the boilerplate work when extracting site/pedon/horizon data from a local NASIS database. Pedons that are missing horizon data, or have errors in their horizonation are excluded from the returned object, however, their IDs are printed on the console. Pedons with combination horizons (e.g. B/C) are erroneously marked as errors due to the way in which they are stored in NASIS as two overlapping horizon records. See getHzErrorsNASIS for a simple approach to identifying pedons with problematic horizonation.

Examples

Run this code
# query depends on some pedon data, queried against the national database
# note that you must setup this connection ahead of time
f <- fetchNASIS()

# plot only those profiles with densic contact
plot(f[which(f$densic.contact), ], name='hzname')

# get basic component data from local NASIS, after performing a 
# DMU-* query against the national database
fc <- fetchNASIS_component_data()

Run the code above in your browser using DataLab