DOI-USGS / dataRetrieval

This R package is designed to obtain USGS or EPA water quality sample data, streamflow data, and metadata directly from web services.
https://doi-usgs.github.io/dataRetrieval/
Other
261 stars 84 forks source link

Can't use importNWISqw in version 2.4.4 #166

Closed jmusgs closed 8 years ago

jmusgs commented 8 years ago

We use this command frequently for use in rloadest, and other packages. It works in 2.3.1 but not now.

ldecicco-USGS commented 8 years ago

The rloadest package calls the smwrQW package, which includes the importNWISqw function (which calls readNWISqw from dataRetrieval). I think you need the latest smwrQW package, so re-install:

install.packages("smwrQW", repos="http://owi.usgs.gov/R")

You should be on version 0.7.8 (check with sessionInfo())

When I do this:

library(rloadest)
RoosterTN.qw <- importNWISqw("01208873", params="00600",begin.date="2007-10-01", end.date="2013-09-30")

It works for me. Here are the versions I'm using:

> devtools::session_info()
Session info ------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.2.3 (2015-12-10)
 system   x86_64, mingw32             
 ui       RStudio (0.99.491)          
 language (EN)                        
 collate  English_United States.1252  
 tz       America/Chicago             
 date     2016-01-26                  

Packages ----------------------------------------------------------------------------------------------
 package       * version    date       source                               
 akima           0.5-12     2015-09-15 CRAN (R 3.2.2)                       
 assertthat      0.1        2013-12-06 CRAN (R 3.1.1)                       
 bitops          1.0-6      2013-08-17 CRAN (R 3.1.1)                       
 boot            1.3-17     2015-06-29 CRAN (R 3.2.3)                       
 car             2.1-1      2015-12-14 CRAN (R 3.2.3)                       
 codetools       0.2-14     2015-07-15 CRAN (R 3.2.3)                       
 coin            1.1-2      2015-11-16 CRAN (R 3.2.2)                       
 dataRetrieval * 2.4.5      2016-01-07 Github (USGS-R/dataRetrieval@95243b7)
 DBI             0.3.1      2014-09-24 CRAN (R 3.1.1)                       
 devtools        1.9.1      2015-09-11 CRAN (R 3.2.2)                       
 digest          0.6.9      2016-01-08 CRAN (R 3.2.3)                       
 dplyr           0.4.3      2015-09-01 CRAN (R 3.2.2)                       
 KernSmooth      2.23-15    2015-06-29 CRAN (R 3.2.3)                       
 lattice         0.20-33    2015-07-14 CRAN (R 3.2.3)                       
 leaps           2.9        2009-05-05 CRAN (R 3.2.0)                       
 lme4            1.1-10     2015-10-06 CRAN (R 3.2.2)                       
 lubridate     * 1.5.0      2015-12-03 CRAN (R 3.2.2)                       
 magrittr        1.5        2014-11-22 CRAN (R 3.1.2)                       
 MASS            7.3-45     2015-11-10 CRAN (R 3.2.3)                       
 Matrix          1.2-3      2015-11-28 CRAN (R 3.2.3)                       
 MatrixModels    0.4-1      2015-08-22 CRAN (R 3.2.2)                       
 memoise         0.2.1      2014-04-22 CRAN (R 3.1.1)                       
 mgcv            1.8-9      2015-10-30 CRAN (R 3.2.3)                       
 minqa           1.2.4      2014-10-09 CRAN (R 3.2.0)                       
 modeltools      0.2-21     2013-09-02 CRAN (R 3.2.0)                       
 multcomp        1.4-2      2016-01-19 CRAN (R 3.2.2)                       
 mvtnorm         1.0-4      2016-01-19 CRAN (R 3.2.2)                       
 NADA            1.5-6      2013-12-06 CRAN (R 3.2.0)                       
 nlme            3.1-122    2015-08-19 CRAN (R 3.2.3)                       
 nloptr          1.0.4      2014-08-04 CRAN (R 3.2.0)                       
 nnet            7.3-11     2015-08-30 CRAN (R 3.2.3)                       
 pbkrtest        0.4-5      2016-01-20 CRAN (R 3.2.2)                       
 plyr            1.8.3      2015-06-12 CRAN (R 3.2.0)                       
 quantreg        5.19       2015-08-31 CRAN (R 3.2.2)                       
 R6              2.1.1      2015-08-19 CRAN (R 3.2.2)                       
 randtests       1.0        2014-11-17 CRAN (R 3.2.3)                       
 Rcpp            0.12.3     2016-01-10 CRAN (R 3.2.3)                       
 RCurl           1.95-4.7   2015-06-30 CRAN (R 3.2.1)                       
 readr           0.2.2.9000 2015-12-17 Github (hadley/readr@ef750db)        
 reshape2        1.4.1      2014-12-06 CRAN (R 3.2.0)                       
 rloadest      * 0.4.3      <NA>       local                                
 roxygen2        5.0.1      2015-11-11 CRAN (R 3.2.2)                       
 rstudioapi      0.4.0      2015-12-09 CRAN (R 3.2.2)                       
 sandwich        2.3-4      2015-09-24 CRAN (R 3.2.2)                       
 segmented       0.5-1.4    2015-11-04 CRAN (R 3.2.2)                       
 smwrBase      * 1.1.2      2015-12-16 local                                
 smwrGraphs    * 1.1.1      2015-12-30 local                                
 smwrQW        * 0.7.8      2016-01-23 local                                
 smwrStats     * 0.7.4      2016-01-06 local                                
 sp              1.2-1      2015-10-18 CRAN (R 3.2.2)                       
 SparseM         1.7        2015-08-15 CRAN (R 3.2.2)                       
 stringi         1.0-1      2015-10-22 CRAN (R 3.2.2)                       
 stringr         1.0.0      2015-04-30 CRAN (R 3.2.0)                       
 survival        2.38-3     2015-07-02 CRAN (R 3.2.2)                       
 TH.data         1.0-6      2015-01-05 CRAN (R 3.2.2)                       
 truncnorm       1.0-7      2014-01-21 CRAN (R 3.2.2)                       
 XML             3.98-1.3   2015-06-30 CRAN (R 3.2.1)                       
 zCompositions   1.0.3      2014-09-12 CRAN (R 3.2.0)                       
 zoo             1.7-12     2015-03-16 CRAN (R 3.2.0)       
ldecicco-USGS commented 8 years ago

If you update smwrQW and still have this problems, re-open this issue.

jmusgs commented 8 years ago

ok, I haven't had a chance to follow up on this, but will do so soon. I am sidetracked with storm surge sensor data...

Thanks for your help.

-John

On Wed, Jan 27, 2016 at 4:07 PM, Laura DeCicco notifications@github.com wrote:

If you update smwrQW and still have this problems, re-open this issue.

— Reply to this email directly or view it on GitHub https://github.com/USGS-R/dataRetrieval/issues/166#issuecomment-175714870 .

John R. Mullaney Hydrologist U.S. Geological Survey New England Water Science Center Connecticut Office 101 Pitkin Street East Hartford, CT 06108 860-291-6760 860-372-2672 cell ct.water.usgs.gov