stage_nwis_ts: stage nwis data into a file

Description Usage Arguments Value Examples

View source: R/stage_nwis_ts.R

Description

get data from nwis and return created file handle

Usage

1
2
stage_nwis_ts(sites, var, times, folder = tempdir(), version = c("rds",
  "tsv"), verbose = FALSE)

Arguments

sites

a character vector of valid NWIS site IDs

var

short name of variable as in unique(get_var_src_codes(out="var"))

times

a length 2 vector of text dates in YYYY-MM-DD format

folder

a folder to place the file outputs in (defaults to temp directory)

version

character string indicating whether you want to stage the ts as an .rds or .tsv

verbose

provide verbose output (currently not implemented)

Value

a character vector of file handles

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 

files <- stage_nwis_ts(sites = c("nwis_06893820","nwis_01484680"), 
  var = "doobs", times = c('2014-01-01','2014-01-02'), verbose=TRUE)
head(read_ts(files[1]))

# par is unavailable for all sites, so returns NULL
stage_nwis_ts(sites = list_sites(), var = "par",
  times = c('2014-01-01', '2014-01-03'), verbose=TRUE) 

## End(Not run)

USGS-R/mda.streams documentation built on Dec. 19, 2017, 10:25 p.m.