Learn R Programming

soilDB (version 2.5)

fetchPedonPC: Fetch commonly used site/horizon data from a PedonPC v.5 database.

Description

Fetch commonly used site/horizon data from a version 5.x PedonPC database, return as a SoilProfileCollection object.

Usage

fetchPedonPC(dsn)
getHzErrorsPedonPC(dsn, strict=TRUE)

Arguments

dsn

The path to a PedonPC version 5.x database

strict

should horizonation by strictly enforced? (TRUE)

Value

a SoilProfileCollection class object

Details

This function currently works only on Windows.

See Also

get_hz_data_from_pedon_db

Examples

Run this code
# NOT RUN {
if(require(aqp)) {
  # path to local PedonPC back-end DB
  dsn <- "S:/Service_Center/NRCS/pedon/pedon.accdb"
  
    if(file.exists(dsn)) {
      # get routinely used soil data SoilProfileCollection object
      f <- fetchPedonPC(dsn)
      
      # determine which profiles have densic contacts
      idx <- which(f$densic.contact)
      
      # plot only those profiles with densic contact
      if(length(idx))
        plot(f[idx, ], name='hzname')
    }
}
# }

Run the code above in your browser using DataLab