fetchPedonPC {soilDB} | R Documentation |
Fetch commonly used site/horizon data from a version 5.x PedonPC database, return as a SoilProfileCollection object.
fetchPedonPC(dsn) getHzErrorsPedonPC(dsn, strict=TRUE)
dsn |
The path to a PedonPC version 5.x database |
strict |
should horizonation by strictly enforced? (TRUE) |
This function currently works only on Windows.
a SoilProfileCollection class object
This fuction attempts to do most of the boilerplate work when extracting site/horizon data from a PedonPC or local NASIS database. Pedons that have errors in their horizonation are excluded from the returned object, however, their IDs are printed on the console. See getHzErrorsPedonPC
for a simple approach to identifying pedons with problematic horizonation. Records from the 'taxhistory' table are selected based on 1) most recent record, or 2) record with the least amount of missing data.
D. E. Beaudette and J. M. Skovlin
## Not run:
##D # path to local PedonPC back-end DB
##D dsn <- "S:/Service_Center/NRCS/pedon/pedon.accdb"
##D
##D # get routinely used soil data SoilProfileCollection object
##D f <- fetchPedonPC(dsn)
##D
##D # plot only those profiles with densic contact
##D plot(f[which(f$densic.contact), ], name='hzname')
## End(Not run)