Skip to content

Commit

Permalink
Merge pull request #52 from ldecicco-USGS/master
Browse files Browse the repository at this point in the history
Added error handling. Fixes #50.
  • Loading branch information
ldecicco-USGS committed Apr 13, 2015
2 parents 4e3e8ac + 2df0854 commit 59013ec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/modelEstimation.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ modelEstimation<-function(eList,
localSample <- getSample(eList)
localDaily <- getDaily(eList)

if(any(localSample$ConcLow[!is.na(localSample$ConcLow)] == 0)){

stop("modelEstimation cannot be run with 0 values in ConcLow. An estimate of the reporting limit needs to be included. See fixSampleFrame to adjust the Sample data frame")
}

numDays <- length(localDaily$DecYear)
DecLow <- localDaily$DecYear[1]
DecHigh <- localDaily$DecYear[numDays]
Expand Down

0 comments on commit 59013ec

Please sign in to comment.