Skip to content

Commit

Permalink
undoing stop(), fetchNASIS doest not require an ODBC connection anymo…
Browse files Browse the repository at this point in the history
…re to function, from = "pedon_report" is partially meant to alleviate
  • Loading branch information
smroecker committed Jan 27, 2020
1 parent 112e191 commit 6943b05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/fetchNASIS_pedons.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# get NASIS site/pedon/horizon/diagnostic feature data
.fetchNASIS_pedons <- function(SS=TRUE, rmHzErrors=TRUE, nullFragsAreZero=TRUE, soilColorState='moist', lab=FALSE, stringsAsFactors = default.stringsAsFactors()) {

# test connection
# test connection, should not be required, can be used if from = "pedon_report"
if(! 'nasis_local' %in% names(RODBC::odbcDataSources()))
stop('Local NASIS ODBC connection has not been setup. Please see `http://ncss-tech.github.io/AQP/soilDB/setup_local_nasis.html`.')
warning('Local NASIS ODBC connection has not been setup. Please see `http://ncss-tech.github.io/AQP/soilDB/setup_local_nasis.html`.')

# sanity check
if(! soilColorState %in% c('dry', 'moist'))
Expand Down

0 comments on commit 6943b05

Please sign in to comment.