How readNWISSample() handles records where concentration is stored as exactly 0.0
rmhirsch49 opened this issue · comments
In the past, as I remember it, when one ran readNWISSample() and the data set contained a concentration value that was coded as exactly 0.0, the function would go ahead and do the retrieval and also send a warning message saying that this happened and that the offending values were left out of the Sample data frame that was created.
When I ran a job today I got an error message, and it never gave me the desired Sample data frame. I was able to see when the bad data point was and redo my retrieval and go ahead, but that seems less than ideal. Do you think I recall correctly how it was done. I would like to have it create the Sample data frame and tell the user that these zeros were deleted.
Try this example
library(EGRET)
staC <- "01646580"
staQ <- "01646500"
param <- "00665"
Sample <- readNWISSample(staC, param)
Then I did it again with a start date of 1980-06-01 and it worked fine (except that I couldn't get any data from before that date)
Bob
I think I see the issue and should have a fix up early this afternoon!
Try installing from GitHub and let me know if anything still is working incorrectly:
remotes::install_github("DOI-USGS/EGRET")
I also ran into this issue. I tried installing from GitHub and I am still getting the same error.
@lnaslund , could you paste the code you used to see the error again? Or let me know the site ID? While you are at it, paste your session info so I can try to tell if it's a dependency problem or your particular site has something funky going on:
library(EGRET)
sessionInfo()
Apologies for the delay. The issue appears to be resolved. Thank you.