I'm learning the dataRetrieval package. Following the example in Section
1.1.2 of the vignette (whatNWISdata) I prepared this script:
------
library("dataRetrieval")
siteNumbers <- c("14207920","14208000","14208200","14208300","14208500","14208600","14208700","14208850","14209000","14209100","14209250","14209500","14209600","14209670","14209700","14209710","14209750","14209775","14209790","14209900","14210000","14210005","14210020","14210025","14210030","14210100","14210150","14210152","14210160","14210200","14210255","14210400","14210480","14210490","14210500","14210530","14210535","14210600","14210650","14210676","14210750","14210760","14210765","14210800","14210830","14210850","14210900","14211000","14211004","14211005","14211006","14211008","14211010","14211023","14211494")
dataAvailable <- whatNWISdata(siteNumbers, service="all", parameterCD="all", statCD="all")
-----
The vignette says that for service, parameterCD, and statCD the default is
"all", but the package wants that explicitly. So that's what I did. Yet, my
syntax is still off:
source("R-scripts/get-site-data-list.R")
Error: All components of query must be named
Please show me what I'm missing.
Rich
You failed to name the first parameter, siteNumbers?
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Sat, Sep 5, 2020 at 4:44 PM Rich Shepard <rshepard at appl-ecosys.com>
wrote:
I'm learning the dataRetrieval package. Following the example in Section
1.1.2 of the vignette (whatNWISdata) I prepared this script:
------
library("dataRetrieval")
siteNumbers <-
c("14207920","14208000","14208200","14208300","14208500","14208600","14208700","14208850","14209000","14209100","14209250","14209500","14209600","14209670","14209700","14209710","14209750","14209775","14209790","14209900","14210000","14210005","14210020","14210025","14210030","14210100","14210150","14210152","14210160","14210200","14210255","14210400","14210480","14210490","14210500","14210530","14210535","14210600","14210650","14210676","14210750","14210760","14210765","14210800","14210830","14210850","14210900","14211000","14211004","14211005","14211006","14211008","14211010","14211023","14211494")
dataAvailable <- whatNWISdata(siteNumbers, service="all",
parameterCD="all", statCD="all")
-----
The vignette says that for service, parameterCD, and statCD the default is
"all", but the package wants that explicitly. So that's what I did. Yet, my
syntax is still off:
source("R-scripts/get-site-data-list.R")
Error: All components of query must be named
Please show me what I'm missing.
Rich
I'm learning the dataRetrieval package. Following the example in Section
1.1.2 of the vignette (whatNWISdata) I prepared this script:
------
library("dataRetrieval")
siteNumbers <-
c("14207920","14208000","14208200","14208300","14208500","14208600","14208700","14208850","14209000","14209100","14209250","14209500","14209600","14209670","14209700","14209710","14209750","14209775","14209790","14209900","14210000","14210005","14210020","14210025","14210030","14210100","14210150","14210152","14210160","14210200","14210255","14210400","14210480","14210490","14210500","14210530","14210535","14210600","14210650","14210676","14210750","14210760","14210765","14210800","14210830","14210850","14210900","14211000","14211004","14211005","14211006","14211008","14211010","14211023","14211494")
dataAvailable <- whatNWISdata(siteNumbers, service="all",
parameterCD="all", statCD="all")
-----
The vignette says that for service, parameterCD, and statCD the
default is
"all", but the package wants that explicitly. So that's what I did.
Yet, my
syntax is still off:
source("R-scripts/get-site-data-list.R")
Error: All components of query must be named
Please show me what I'm missing.
Rich
Name all your arguments (the vignette gets this wrong), including
siteNumber=siteNumbers.
Also, the vignette uses 'statCd', not 'statCD'.
dataAvailable <- whatNWISdata(siteNumber=siteNumbers, service="all",
statCd="all")
gives some results.
-Bill
On Sat, Sep 5, 2020 at 4:44 PM Rich Shepard <rshepard at appl-ecosys.com>
wrote:
I'm learning the dataRetrieval package. Following the example in Section
1.1.2 of the vignette (whatNWISdata) I prepared this script:
------
library("dataRetrieval")
siteNumbers <-
c("14207920","14208000","14208200","14208300","14208500","14208600","14208700","14208850","14209000","14209100","14209250","14209500","14209600","14209670","14209700","14209710","14209750","14209775","14209790","14209900","14210000","14210005","14210020","14210025","14210030","14210100","14210150","14210152","14210160","14210200","14210255","14210400","14210480","14210490","14210500","14210530","14210535","14210600","14210650","14210676","14210750","14210760","14210765","14210800","14210830","14210850","14210900","14211000","14211004","14211005","14211006","14211008","14211010","14211023","14211494")
dataAvailable <- whatNWISdata(siteNumbers, service="all",
parameterCD="all", statCD="all")
-----
The vignette says that for service, parameterCD, and statCD the default is
"all", but the package wants that explicitly. So that's what I did. Yet, my
syntax is still off:
source("R-scripts/get-site-data-list.R")
Error: All components of query must be named
Please show me what I'm missing.
Rich
David/Bert,
Mea culpa! The vignette example used a single siteNumber which is also the
variable name and I missed that last point.
Thank you very much.
Regards,
Rich