Fetch commonly used site/pedon/horizon or component data from NASIS.
Fetch commonly used site/pedon/horizon data or component from NASIS, returned as a SoilProfileCollection object.
fetchNASIS( from = "pedons", url = NULL, SS = TRUE, rmHzErrors = TRUE, nullFragsAreZero = TRUE, soilColorState = "moist", lab = FALSE, fill = FALSE, stringsAsFactors = default.stringsAsFactors(), dsn = NULL )
from |
determines what objects should fetched? ('pedons' | 'components' | 'pedon_report') |
url |
string specifying the url for the NASIS pedon_report (default:
|
SS |
fetch data from the currently loaded selected set in NASIS or from
the entire local database (default: |
rmHzErrors |
should pedons with horizon depth errors be removed from
the results? (default: |
nullFragsAreZero |
should fragment volumes of |
soilColorState |
which colors should be used to generate the
convenience field |
lab |
should the |
fill |
( |
stringsAsFactors |
logical: should character vectors be converted to
factors? This argument is passed to the |
dsn |
Optional: path to local SQLite database containing NASIS
table structure; default: |
This function imports data from NASIS into R as a
SoilProfileCollection
object. It "flattens" NASIS pedon and component
tables, including their child tables, into several more easily manageable
data frames. Primarily these functions access the local NASIS database using
an ODBC connection. However using the fetchNASIS()
argument
from = "pedon_report"
, data can be read from the NASIS Report
'fetchNASIS', as either a txt file or url. The primary purpose of
fetchNASIS(from = "pedon_report")
is to facilitate importing datasets
larger than 8000+ pedons/components.
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 interpreted as NULL
. 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 or component 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.
Tutorials:
A SoilProfileCollection object
D. E. Beaudette, J. M. Skovlin, S.M. Roecker, A.G. Brown
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.