Commit 9ddedbf1 authored by Laura A DeCicco's avatar Laura A DeCicco
Browse files

Changing dontrun to donttest for better checks of the package.

parent 9f6295db
This diff is collapsed.
......@@ -151,13 +151,10 @@ date column name. For WQP, there will be 2 columns: `ActivityStartDateWY` and
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='no'>dataTemp</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='readNWISdata.html'>readNWISdata</a></span>(<span class='kw'>stateCd</span><span class='kw'>=</span><span class='st'>"OH"</span>,<span class='kw'>parameterCd</span><span class='kw'>=</span><span class='st'>"00010"</span>, <span class='kw'>service</span><span class='kw'>=</span><span class='st'>"dv"</span>)
<pre class="examples"><div class='input'><span class='no'>dataTemp</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='readNWISdata.html'>readNWISdata</a></span>(<span class='kw'>stateCd</span><span class='kw'>=</span><span class='st'>"OH"</span>,<span class='kw'>parameterCd</span><span class='kw'>=</span><span class='st'>"00010"</span>, <span class='kw'>service</span><span class='kw'>=</span><span class='st'>"dv"</span>)
<span class='no'>dataTemp</span> <span class='kw'>&lt;-</span> <span class='fu'>addWaterYear</span>(<span class='no'>dataTemp</span>)
<span class='no'>pHData</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='readWQPdata.html'>readWQPdata</a></span>(<span class='kw'>siteid</span><span class='kw'>=</span><span class='st'>"USGS-04024315"</span>,<span class='kw'>characteristicName</span><span class='kw'>=</span><span class='st'>"pH"</span>)
<span class='no'>pHData</span> <span class='kw'>&lt;-</span> <span class='fu'>addWaterYear</span>(<span class='no'>pHData</span>)
<span class='co'># }</span></pre>
<span class='no'>pHData</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='readWQPdata.html'>readWQPdata</a></span>(<span class='kw'>siteid</span><span class='kw'>=</span><span class='st'>"USGS-04024315"</span>,<span class='kw'>characteristicName</span><span class='kw'>=</span><span class='st'>"pH"</span>)</div><div class='output co'>#&gt; <span class='message'>Request failed [500]. Retrying in 1 seconds...</span></div><div class='output co'>#&gt; <span class='message'>Request failed [406]. Retrying in 3.3 seconds...</span></div><div class='input'><span class='no'>pHData</span> <span class='kw'>&lt;-</span> <span class='fu'>addWaterYear</span>(<span class='no'>pHData</span>)</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
......
......@@ -153,9 +153,7 @@ GET with more informative error messages." />
<span class='no'>endDate</span> <span class='kw'>&lt;-</span> <span class='st'>"2012-10-01"</span>
<span class='no'>offering</span> <span class='kw'>&lt;-</span> <span class='st'>'00003'</span>
<span class='no'>property</span> <span class='kw'>&lt;-</span> <span class='st'>'00060'</span>
<span class='no'>obs_url</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='constructNWISURL.html'>constructNWISURL</a></span>(<span class='no'>siteNumber</span>,<span class='no'>property</span>,<span class='no'>startDate</span>,<span class='no'>endDate</span>,<span class='st'>'dv'</span>)</div><span class='co'># NOT RUN {</span>
<span class='no'>rawData</span> <span class='kw'>&lt;-</span> <span class='fu'>getWebServiceData</span>(<span class='no'>obs_url</span>)
<span class='co'># }</span></pre>
<span class='no'>obs_url</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='constructNWISURL.html'>constructNWISURL</a></span>(<span class='no'>siteNumber</span>,<span class='no'>property</span>,<span class='no'>startDate</span>,<span class='no'>endDate</span>,<span class='st'>'dv'</span>)</div><div class='input'><span class='no'>rawData</span> <span class='kw'>&lt;-</span> <span class='fu'>getWebServiceData</span>(<span class='no'>obs_url</span>)</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
......
......@@ -157,8 +157,7 @@ for more information on time zones.</p></td>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='no'>obs_url</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/paste'>paste</a></span>(<span class='st'>"http://cida.usgs.gov/ngwmn_cache/sos?request=GetObservation"</span>,
<pre class="examples"><div class='input'><span class='no'>obs_url</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/paste'>paste</a></span>(<span class='st'>"http://cida.usgs.gov/ngwmn_cache/sos?request=GetObservation"</span>,
<span class='st'>"service=SOS"</span>,<span class='st'>"version=2.0.0"</span>,
<span class='st'>"observedProperty=urn:ogc:def:property:OGC:GroundWaterLevel"</span>,
<span class='st'>"responseFormat=text/xml"</span>,
......@@ -170,8 +169,7 @@ for more information on time zones.</p></td>
<span class='st'>"observedProperty=urn:ogc:def:property:OGC:GroundWaterLevel"</span>,
<span class='st'>"responseFormat=text/xml"</span>,
<span class='st'>"featureOfInterest=VW_GWDP_GEOSERVER.USGS.474011117072901"</span>,<span class='kw'>sep</span><span class='kw'>=</span><span class='st'>"&amp;"</span>)
<span class='no'>data</span> <span class='kw'>&lt;-</span> <span class='fu'>importNGWMN</span>(<span class='no'>obs_url</span>)
<span class='co'># }</span><div class='input'>
<span class='no'>data</span> <span class='kw'>&lt;-</span> <span class='fu'>importNGWMN</span>(<span class='no'>obs_url</span>)</div><div class='input'>
</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
......
......@@ -196,8 +196,7 @@ when older data was reported as dates, and newer data was reported as a date/tim
<span class='no'>property</span> <span class='kw'>&lt;-</span> <span class='st'>"00060"</span>
<span class='no'>obs_url</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='constructNWISURL.html'>constructNWISURL</a></span>(<span class='no'>site_id</span>,<span class='no'>property</span>,
<span class='no'>startDate</span>,<span class='no'>endDate</span>,<span class='st'>"dv"</span>,<span class='kw'>format</span><span class='kw'>=</span><span class='st'>"tsv"</span>)</div><span class='co'># NOT RUN {</span>
<span class='no'>data</span> <span class='kw'>&lt;-</span> <span class='fu'>importRDB1</span>(<span class='no'>obs_url</span>)
<span class='no'>startDate</span>,<span class='no'>endDate</span>,<span class='st'>"dv"</span>,<span class='kw'>format</span><span class='kw'>=</span><span class='st'>"tsv"</span>)</div><div class='input'><span class='no'>data</span> <span class='kw'>&lt;-</span> <span class='fu'>importRDB1</span>(<span class='no'>obs_url</span>)
<span class='no'>urlMultiPcodes</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='constructNWISURL.html'>constructNWISURL</a></span>(<span class='st'>"04085427"</span>,<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"00060"</span>,<span class='st'>"00010"</span>),
<span class='no'>startDate</span>,<span class='no'>endDate</span>,<span class='st'>"dv"</span>,<span class='kw'>statCd</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"00003"</span>,<span class='st'>"00001"</span>),<span class='st'>"tsv"</span>)
......@@ -214,8 +213,7 @@ when older data was reported as dates, and newer data was reported as a date/tim
<span class='no'>end</span> <span class='kw'>&lt;-</span> <span class='st'>"2015-11-24"</span>
<span class='no'>urlIce</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='constructNWISURL.html'>constructNWISURL</a></span>(<span class='no'>iceSite</span>,<span class='st'>"00060"</span>,<span class='no'>start</span>, <span class='no'>end</span>,<span class='st'>"uv"</span>,<span class='kw'>format</span><span class='kw'>=</span><span class='st'>"tsv"</span>)
<span class='no'>ice</span> <span class='kw'>&lt;-</span> <span class='fu'>importRDB1</span>(<span class='no'>urlIce</span>, <span class='kw'>asDateTime</span><span class='kw'>=</span><span class='fl'>TRUE</span>)
<span class='no'>iceNoConvert</span> <span class='kw'>&lt;-</span> <span class='fu'>importRDB1</span>(<span class='no'>urlIce</span>, <span class='kw'>convertType</span><span class='kw'>=</span><span class='fl'>FALSE</span>)
<span class='co'># }</span><div class='input'><span class='co'># User file:</span>
<span class='no'>iceNoConvert</span> <span class='kw'>&lt;-</span> <span class='fu'>importRDB1</span>(<span class='no'>urlIce</span>, <span class='kw'>convertType</span><span class='kw'>=</span><span class='fl'>FALSE</span>)</div><div class='input'><span class='co'># User file:</span>
<span class='no'>filePath</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/system.file'>system.file</a></span>(<span class='st'>"extdata"</span>, <span class='kw'>package</span><span class='kw'>=</span><span class='st'>"dataRetrieval"</span>)
<span class='no'>fileName</span> <span class='kw'>&lt;-</span> <span class='st'>"RDB1Example.txt"</span>
<span class='no'>fullPath</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/file.path'>file.path</a></span>(<span class='no'>filePath</span>, <span class='no'>fileName</span>)
......
......@@ -160,17 +160,14 @@ start and end times, and converted to UTC. See <a href='https://www.waterquality
<pre class="examples"><div class='input'># These examples require an internet connection to run
## Examples take longer than 5 seconds:
</div><span class='co'># NOT RUN {</span>
<span class='no'>rawSampleURL</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='constructWQPURL.html'>constructWQPURL</a></span>(<span class='st'>'USGS-01594440'</span>,<span class='st'>'01075'</span>, <span class='st'>''</span>, <span class='st'>''</span>)
</div><div class='input'><span class='no'>rawSampleURL</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='constructWQPURL.html'>constructWQPURL</a></span>(<span class='st'>'USGS-01594440'</span>,<span class='st'>'01075'</span>, <span class='st'>''</span>, <span class='st'>''</span>)
<span class='no'>rawSample</span> <span class='kw'>&lt;-</span> <span class='fu'>importWQP</span>(<span class='no'>rawSampleURL</span>)
<span class='no'>rawSampleURL_Zip</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='constructWQPURL.html'>constructWQPURL</a></span>(<span class='st'>'USGS-01594440'</span>,<span class='st'>'01075'</span>, <span class='st'>''</span>, <span class='st'>''</span>, <span class='fl'>TRUE</span>)
<span class='no'>rawSample2</span> <span class='kw'>&lt;-</span> <span class='fu'>importWQP</span>(<span class='no'>rawSampleURL_Zip</span>, <span class='kw'>zip</span><span class='kw'>=</span><span class='fl'>TRUE</span>)
<span class='no'>rawSample2</span> <span class='kw'>&lt;-</span> <span class='fu'>importWQP</span>(<span class='no'>rawSampleURL_Zip</span>, <span class='kw'>zip</span><span class='kw'>=</span><span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='message'>zip encoding access still in development</span></div><div class='input'>
<span class='no'>STORETex</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='constructWQPURL.html'>constructWQPURL</a></span>(<span class='st'>'WIDNR_WQX-10032762'</span>,<span class='st'>'Specific conductance'</span>, <span class='st'>''</span>, <span class='st'>''</span>)
<span class='no'>STORETdata</span> <span class='kw'>&lt;-</span> <span class='fu'>importWQP</span>(<span class='no'>STORETex</span>)
<span class='co'># }</span></pre>
<span class='no'>STORETdata</span> <span class='kw'>&lt;-</span> <span class='fu'>importWQP</span>(<span class='no'>STORETex</span>)</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
......
......@@ -189,8 +189,7 @@ and S is the statistic code (if applicable).</p>
<span class='no'>endDate</span> <span class='kw'>&lt;-</span> <span class='st'>"2012-10-01"</span>
<span class='no'>offering</span> <span class='kw'>&lt;-</span> <span class='st'>'00003'</span>
<span class='no'>property</span> <span class='kw'>&lt;-</span> <span class='st'>'00060'</span>
<span class='no'>obs_url</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='constructNWISURL.html'>constructNWISURL</a></span>(<span class='no'>site_id</span>,<span class='no'>property</span>,<span class='no'>startDate</span>,<span class='no'>endDate</span>,<span class='st'>'dv'</span>)</div># NOT RUN {
data <- importWaterML1(obs_url, asDateTime=TRUE)
<span class='no'>obs_url</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='constructNWISURL.html'>constructNWISURL</a></span>(<span class='no'>site_id</span>,<span class='no'>property</span>,<span class='no'>startDate</span>,<span class='no'>endDate</span>,<span class='st'>'dv'</span>)</div><div class='input'>data <- importWaterML1(obs_url, asDateTime=TRUE)
groundWaterSite <- "431049071324301"
startGW <- "2013-10-01"
......@@ -231,8 +230,10 @@ url <- constructNWISURL(service = 'dv', siteNumber = '02319300', parameterCd = "
startDate = "2014-01-01", endDate = "2014-01-01")
raw <- content(httr::GET(url), as = 'raw')
rawParsed <- importWaterML1(raw)
# }
<div class='input'><span class='no'>filePath</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/system.file'>system.file</a></span>(<span class='st'>"extdata"</span>, <span class='kw'>package</span><span class='kw'>=</span><span class='st'>"dataRetrieval"</span>)
</div><div class='output co'>#&gt; <span class='error'>Error: &lt;text&gt;:33:10: unexpected symbol</span>
#&gt; <span class='error'>32: </span>
#&gt; <span class='error'>33: Timezone change</span>
#&gt; <span class='error'> ^</span></div><div class='input'><span class='no'>filePath</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/system.file'>system.file</a></span>(<span class='st'>"extdata"</span>, <span class='kw'>package</span><span class='kw'>=</span><span class='st'>"dataRetrieval"</span>)
<span class='no'>fileName</span> <span class='kw'>&lt;-</span> <span class='st'>"WaterML1Example.xml"</span>
<span class='no'>fullPath</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/file.path'>file.path</a></span>(<span class='no'>filePath</span>, <span class='no'>fileName</span>)
<span class='no'>importFile</span> <span class='kw'>&lt;-</span> <span class='fu'>importWaterML1</span>(<span class='no'>fullPath</span>,<span class='fl'>TRUE</span>)</div></pre>
......
......@@ -156,9 +156,7 @@ Possible values are "America/New_York","America/Chicago", "America/Denver","Amer
<span class='st'>"startDT=2014-09-01"</span>,
<span class='st'>"endDT=2014-09-08"</span>,
<span class='st'>"statCd=00003"</span>,
<span class='st'>"parameterCd=00060"</span>,<span class='kw'>sep</span><span class='kw'>=</span><span class='st'>"&amp;"</span>)</div><span class='co'># NOT RUN {</span>
<span class='no'>timesereies</span> <span class='kw'>&lt;-</span> <span class='fu'>importWaterML2</span>(<span class='no'>URL</span>, <span class='kw'>asDateTime</span><span class='kw'>=</span><span class='fl'>TRUE</span>, <span class='kw'>tz</span><span class='kw'>=</span><span class='st'>"UTC"</span>)
<span class='co'># }</span></pre>
<span class='st'>"parameterCd=00060"</span>,<span class='kw'>sep</span><span class='kw'>=</span><span class='st'>"&amp;"</span>)</div><div class='input'><span class='no'>timesereies</span> <span class='kw'>&lt;-</span> <span class='fu'>importWaterML2</span>(<span class='no'>URL</span>, <span class='kw'>asDateTime</span><span class='kw'>=</span><span class='fl'>TRUE</span>, <span class='kw'>tz</span><span class='kw'>=</span><span class='st'>"UTC"</span>)</div><div class='output co'>#&gt; <span class='error'>Error in matrix(unlist(strsplit(rawTime, "T")), nrow = nVals, byrow = TRUE): 'data' must be of a vector type, was 'NULL'</span></div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -154,23 +154,22 @@ for more information on time zones.</p></td>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='co'>#one site</span>
<pre class="examples"><div class='input'><span class='co'>#one site</span>
<span class='no'>site</span> <span class='kw'>&lt;-</span> <span class='st'>"USGS.430427089284901"</span>
<span class='no'>oneSite</span> <span class='kw'>&lt;-</span> <span class='fu'>readNGWMNlevels</span>(<span class='kw'>siteNumbers</span> <span class='kw'>=</span> <span class='no'>site</span>)
<span class='no'>oneSite</span> <span class='kw'>&lt;-</span> <span class='fu'>readNGWMNlevels</span>(<span class='kw'>siteNumbers</span> <span class='kw'>=</span> <span class='no'>site</span>)</div><div class='output co'>#&gt; <span class='message'>DISCLAIMER: NGWMN retrieval functions are still in flux, </span>
#&gt; <span class='message'> and no future behavior or output is guaranteed</span></div><div class='input'>
<span class='co'>#multiple sites</span>
<span class='no'>sites</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"USGS:272838082142201"</span>,<span class='st'>"USGS:404159100494601"</span>, <span class='st'>"USGS:401216080362703"</span>)
<span class='no'>multiSiteData</span> <span class='kw'>&lt;-</span> <span class='fu'>readNGWMNlevels</span>(<span class='no'>sites</span>)
<span class='no'>multiSiteData</span> <span class='kw'>&lt;-</span> <span class='fu'>readNGWMNlevels</span>(<span class='no'>sites</span>)</div><div class='output co'>#&gt; <span class='message'>DISCLAIMER: NGWMN retrieval functions are still in flux, </span>
#&gt; <span class='message'> and no future behavior or output is guaranteed</span></div><div class='input'>
<span class='co'>#non-USGS site</span>
<span class='no'>site</span> <span class='kw'>&lt;-</span> <span class='st'>"MBMG.892195"</span>
<span class='no'>data</span> <span class='kw'>&lt;-</span> <span class='fu'>readNGWMNlevels</span>(<span class='kw'>siteNumbers</span> <span class='kw'>=</span> <span class='no'>site</span>, <span class='kw'>asDateTime</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='no'>data</span> <span class='kw'>&lt;-</span> <span class='fu'>readNGWMNlevels</span>(<span class='kw'>siteNumbers</span> <span class='kw'>=</span> <span class='no'>site</span>, <span class='kw'>asDateTime</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#&gt; <span class='message'>DISCLAIMER: NGWMN retrieval functions are still in flux, </span>
#&gt; <span class='message'> and no future behavior or output is guaranteed</span></div><div class='output co'>#&gt; <span class='error'>Error in doc_parse_raw(x, encoding = encoding, base_url = base_url, as_html = as_html, options = options): Premature end of data in tag GetObservationResponse line 2 [77]</span></div><div class='input'>
<span class='co'>#site with no data returns empty data frame</span>
<span class='no'>noDataSite</span> <span class='kw'>&lt;-</span> <span class='st'>"UTGS.401544112060301"</span>
<span class='no'>noDataSite</span> <span class='kw'>&lt;-</span> <span class='fu'>readNGWMNlevels</span>(<span class='kw'>siteNumbers</span> <span class='kw'>=</span> <span class='no'>noDataSite</span>)
<span class='co'># }</span></pre>
<span class='no'>noDataSite</span> <span class='kw'>&lt;-</span> <span class='fu'>readNGWMNlevels</span>(<span class='kw'>siteNumbers</span> <span class='kw'>=</span> <span class='no'>noDataSite</span>)</div><div class='output co'>#&gt; <span class='message'>DISCLAIMER: NGWMN retrieval functions are still in flux, </span>
#&gt; <span class='message'> and no future behavior or output is guaranteed</span></div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
......
......@@ -151,20 +151,19 @@ separated by a period or semicolon, e.g. <code>USGS.404159100494601</code>.</p><
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='co'>#one site</span>
<pre class="examples"><div class='input'><span class='co'>#one site</span>
<span class='no'>site</span> <span class='kw'>&lt;-</span> <span class='st'>"USGS.430427089284901"</span>
<span class='no'>oneSite</span> <span class='kw'>&lt;-</span> <span class='fu'>readNGWMNsites</span>(<span class='kw'>siteNumbers</span> <span class='kw'>=</span> <span class='no'>site</span>)
<span class='no'>oneSite</span> <span class='kw'>&lt;-</span> <span class='fu'>readNGWMNsites</span>(<span class='kw'>siteNumbers</span> <span class='kw'>=</span> <span class='no'>site</span>)</div><div class='output co'>#&gt; <span class='message'>DISCLAIMER: NGWMN retrieval functions are still in flux, </span>
#&gt; <span class='message'> and no future behavior or output is guaranteed</span></div><div class='input'>
<span class='co'>#multiple sites</span>
<span class='no'>sites</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"USGS:272838082142201"</span>,<span class='st'>"USGS:404159100494601"</span>, <span class='st'>"USGS:401216080362703"</span>)
<span class='no'>multiSiteInfo</span> <span class='kw'>&lt;-</span> <span class='fu'>readNGWMNsites</span>(<span class='no'>sites</span>)
<span class='no'>multiSiteInfo</span> <span class='kw'>&lt;-</span> <span class='fu'>readNGWMNsites</span>(<span class='no'>sites</span>)</div><div class='output co'>#&gt; <span class='message'>DISCLAIMER: NGWMN retrieval functions are still in flux, </span>
#&gt; <span class='message'> and no future behavior or output is guaranteed</span></div><div class='output co'>#&gt; <span class='error'>Error in xml_root(returnedDoc): inherits(x, c("xml_node", "xml_document", "xml_nodeset")) is not TRUE</span></div><div class='input'>
<span class='co'>#non-USGS site</span>
<span class='no'>site</span> <span class='kw'>&lt;-</span> <span class='st'>"MBMG.892195"</span>
<span class='no'>siteInfo</span> <span class='kw'>&lt;-</span> <span class='fu'>readNGWMNsites</span>(<span class='kw'>siteNumbers</span> <span class='kw'>=</span> <span class='no'>site</span>)
<span class='co'># }</span></pre>
<span class='no'>siteInfo</span> <span class='kw'>&lt;-</span> <span class='fu'>readNGWMNsites</span>(<span class='kw'>siteNumbers</span> <span class='kw'>=</span> <span class='no'>site</span>)</div><div class='output co'>#&gt; <span class='message'>DISCLAIMER: NGWMN retrieval functions are still in flux, </span>
#&gt; <span class='message'> and no future behavior or output is guaranteed</span></div><div class='output co'>#&gt; <span class='message'>No feature found for given feature id</span></div><div class='input'>
</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
......
......@@ -201,8 +201,7 @@ and S is the statistic code (if applicable).</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='co'># Examples not run for time considerations</span>
<pre class="examples"><div class='input'><span class='co'># Examples not run for time considerations</span>
<span class='no'>dataTemp</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdata</span>(<span class='kw'>stateCd</span><span class='kw'>=</span><span class='st'>"OH"</span>,<span class='kw'>parameterCd</span><span class='kw'>=</span><span class='st'>"00010"</span>, <span class='kw'>service</span><span class='kw'>=</span><span class='st'>"dv"</span>)
<span class='no'>instFlow</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdata</span>(<span class='kw'>sites</span><span class='kw'>=</span><span class='st'>"05114000"</span>, <span class='kw'>service</span><span class='kw'>=</span><span class='st'>"iv"</span>,
<span class='kw'>parameterCd</span><span class='kw'>=</span><span class='st'>"00060"</span>,
......@@ -215,11 +214,9 @@ and S is the statistic code (if applicable).</p>
<span class='co'>#Empty:</span>
<span class='no'>multiSite</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdata</span>(<span class='kw'>sites</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"04025000"</span>,<span class='st'>"04072150"</span>), <span class='kw'>service</span><span class='kw'>=</span><span class='st'>"iv"</span>,
<span class='kw'>parameterCd</span><span class='kw'>=</span><span class='st'>"00010"</span>)
<span class='co'>#Not empty:</span>
<span class='kw'>parameterCd</span><span class='kw'>=</span><span class='st'>"00010"</span>)</div><div class='output co'>#&gt; <span class='error'>Error in inherits(x, c("xml_node", "xml_document", "xml_nodeset")): argument is of length zero</span></div><div class='input'><span class='co'>#Not empty:</span>
<span class='no'>multiSite</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdata</span>(<span class='kw'>sites</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"04025500"</span>,<span class='st'>"040263491"</span>),
<span class='kw'>service</span><span class='kw'>=</span><span class='st'>"iv"</span>, <span class='kw'>parameterCd</span><span class='kw'>=</span><span class='st'>"00060"</span>)
<span class='no'>bBoxEx</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdata</span>(<span class='kw'>bBox</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(-<span class='fl'>83</span>,<span class='fl'>36.5</span>,-<span class='fl'>81</span>,<span class='fl'>38.5</span>), <span class='kw'>parameterCd</span><span class='kw'>=</span><span class='st'>"00010"</span>)
<span class='kw'>service</span><span class='kw'>=</span><span class='st'>"iv"</span>, <span class='kw'>parameterCd</span><span class='kw'>=</span><span class='st'>"00060"</span>)</div><div class='output co'>#&gt; <span class='error'>Error in inherits(x, c("xml_node", "xml_document", "xml_nodeset")): argument is of length zero</span></div><div class='input'><span class='no'>bBoxEx</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdata</span>(<span class='kw'>bBox</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(-<span class='fl'>83</span>,<span class='fl'>36.5</span>,-<span class='fl'>81</span>,<span class='fl'>38.5</span>), <span class='kw'>parameterCd</span><span class='kw'>=</span><span class='st'>"00010"</span>)
<span class='no'>startDate</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/as.Date'>as.Date</a></span>(<span class='st'>"2013-10-01"</span>)
<span class='no'>endDate</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/as.Date'>as.Date</a></span>(<span class='st'>"2014-09-30"</span>)
......@@ -237,29 +234,34 @@ and S is the statistic code (if applicable).</p>
<span class='no'>meas</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdata</span>(<span class='kw'>state_cd</span><span class='kw'>=</span><span class='st'>"WI"</span>,<span class='kw'>service</span><span class='kw'>=</span><span class='st'>"measurements"</span>,<span class='kw'>format</span><span class='kw'>=</span><span class='st'>"rdb_expanded"</span>)
<span class='no'>waterYearStat</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdata</span>(<span class='kw'>site</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"03112500"</span>),<span class='kw'>service</span><span class='kw'>=</span><span class='st'>"stat"</span>,<span class='kw'>statReportType</span><span class='kw'>=</span><span class='st'>"annual"</span>,
<span class='kw'>statYearType</span><span class='kw'>=</span><span class='st'>"water"</span>, <span class='kw'>missingData</span><span class='kw'>=</span><span class='st'>"on"</span>)
<span class='no'>monthlyStat</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdata</span>(<span class='kw'>site</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"03112500"</span>,<span class='st'>"03111520"</span>),
<span class='kw'>statYearType</span><span class='kw'>=</span><span class='st'>"water"</span>, <span class='kw'>missingData</span><span class='kw'>=</span><span class='st'>"on"</span>)</div><div class='output co'>#&gt; <span class='message'>Please be aware the NWIS data service feeding this function is in BETA.</span>
#&gt; <span class='message'></span>
#&gt; <span class='message'> Data formatting could be changed at any time, and is not guaranteed</span></div><div class='input'><span class='no'>monthlyStat</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdata</span>(<span class='kw'>site</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"03112500"</span>,<span class='st'>"03111520"</span>),
<span class='kw'>service</span><span class='kw'>=</span><span class='st'>"stat"</span>,
<span class='kw'>statReportType</span><span class='kw'>=</span><span class='st'>"monthly"</span>)
<span class='no'>dailyStat</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdata</span>(<span class='kw'>site</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"03112500"</span>,<span class='st'>"03111520"</span>),
<span class='kw'>statReportType</span><span class='kw'>=</span><span class='st'>"monthly"</span>)</div><div class='output co'>#&gt; <span class='message'>Please be aware the NWIS data service feeding this function is in BETA.</span>
#&gt; <span class='message'></span>
#&gt; <span class='message'> Data formatting could be changed at any time, and is not guaranteed</span></div><div class='input'><span class='no'>dailyStat</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdata</span>(<span class='kw'>site</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"03112500"</span>,<span class='st'>"03111520"</span>),
<span class='kw'>service</span><span class='kw'>=</span><span class='st'>"stat"</span>,
<span class='kw'>statReportType</span><span class='kw'>=</span><span class='st'>"daily"</span>,
<span class='kw'>statType</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"p25"</span>,<span class='st'>"p50"</span>,<span class='st'>"p75"</span>,<span class='st'>"min"</span>,<span class='st'>"max"</span>),
<span class='kw'>parameterCd</span><span class='kw'>=</span><span class='st'>"00065"</span>)
<span class='no'>allDailyStats</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdata</span>(<span class='kw'>site</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"03111548"</span>),
<span class='kw'>parameterCd</span><span class='kw'>=</span><span class='st'>"00065"</span>)</div><div class='output co'>#&gt; <span class='message'>Please be aware the NWIS data service feeding this function is in BETA.</span>
#&gt; <span class='message'></span>
#&gt; <span class='message'> Data formatting could be changed at any time, and is not guaranteed</span></div><div class='input'><span class='no'>allDailyStats</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdata</span>(<span class='kw'>site</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"03111548"</span>),
<span class='kw'>service</span><span class='kw'>=</span><span class='st'>"stat"</span>,
<span class='kw'>statReportType</span><span class='kw'>=</span><span class='st'>"daily"</span>,
<span class='kw'>statType</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"p25"</span>,<span class='st'>"p50"</span>,<span class='st'>"p75"</span>,<span class='st'>"min"</span>,<span class='st'>"max"</span>),
<span class='kw'>parameterCd</span><span class='kw'>=</span><span class='st'>"00060"</span>)
<span class='kw'>parameterCd</span><span class='kw'>=</span><span class='st'>"00060"</span>)</div><div class='output co'>#&gt; <span class='message'>Please be aware the NWIS data service feeding this function is in BETA.</span>
#&gt; <span class='message'></span>
#&gt; <span class='message'> Data formatting could be changed at any time, and is not guaranteed</span></div><div class='input'>
<span class='no'>dailyWV</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdata</span>(<span class='kw'>stateCd</span> <span class='kw'>=</span> <span class='st'>"West Virginia"</span>, <span class='kw'>parameterCd</span> <span class='kw'>=</span> <span class='st'>"00060"</span>)
<span class='no'>arg.list</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/list'>list</a></span>(<span class='kw'>site</span><span class='kw'>=</span><span class='st'>"03111548"</span>,
<span class='kw'>statReportType</span><span class='kw'>=</span><span class='st'>"daily"</span>,
<span class='kw'>statType</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"p25"</span>,<span class='st'>"p50"</span>,<span class='st'>"p75"</span>,<span class='st'>"min"</span>,<span class='st'>"max"</span>),
<span class='kw'>parameterCd</span><span class='kw'>=</span><span class='st'>"00060"</span>)
<span class='no'>allDailyStats_2</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdata</span>(<span class='no'>arg.list</span>, <span class='kw'>service</span><span class='kw'>=</span><span class='st'>"stat"</span>)
<span class='no'>allDailyStats_2</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdata</span>(<span class='no'>arg.list</span>, <span class='kw'>service</span><span class='kw'>=</span><span class='st'>"stat"</span>)</div><div class='output co'>#&gt; <span class='message'>Please be aware the NWIS data service feeding this function is in BETA.</span>
#&gt; <span class='message'></span>
#&gt; <span class='message'> Data formatting could be changed at any time, and is not guaranteed</span></div><div class='input'>
<span class='co'>#' # use county names to get data</span>
<span class='no'>dailyStaffordVA</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdata</span>(<span class='kw'>stateCd</span> <span class='kw'>=</span> <span class='st'>"Virginia"</span>,
<span class='kw'>countyCd</span><span class='kw'>=</span><span class='st'>"Stafford"</span>,
......@@ -277,9 +279,7 @@ and S is the statistic code (if applicable).</p>
<span class='no'>all_sites_24hrs</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdata</span>(<span class='kw'>service</span> <span class='kw'>=</span> <span class='st'>"rating"</span>, <span class='kw'>file_type</span><span class='kw'>=</span><span class='st'>"exsa"</span>, <span class='kw'>period</span> <span class='kw'>=</span> <span class='fl'>24</span>)
<span class='no'>today</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdata</span>(<span class='kw'>service</span><span class='kw'>=</span><span class='st'>"iv"</span>, <span class='kw'>startDate</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/Sys.time'>Sys.Date</a></span>(),
<span class='kw'>parameterCd</span> <span class='kw'>=</span> <span class='st'>"00060"</span>, <span class='kw'>siteNumber</span> <span class='kw'>=</span> <span class='st'>"05114000"</span>)
<span class='co'># }</span></pre>
<span class='kw'>parameterCd</span> <span class='kw'>=</span> <span class='st'>"00060"</span>, <span class='kw'>siteNumber</span> <span class='kw'>=</span> <span class='st'>"05114000"</span>)</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
......
......@@ -190,8 +190,7 @@ and S is the statistic code (if applicable).</p>
<pre class="examples"><div class='input'><span class='no'>site_id</span> <span class='kw'>&lt;-</span> <span class='st'>'04085427'</span>
<span class='no'>startDate</span> <span class='kw'>&lt;-</span> <span class='st'>'2012-01-01'</span>
<span class='no'>endDate</span> <span class='kw'>&lt;-</span> <span class='st'>'2012-06-30'</span>
<span class='no'>pCode</span> <span class='kw'>&lt;-</span> <span class='st'>'00060'</span></div><span class='co'># NOT RUN {</span>
<span class='no'>rawDailyQ</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdv</span>(<span class='no'>site_id</span>,<span class='no'>pCode</span>, <span class='no'>startDate</span>, <span class='no'>endDate</span>)
<span class='no'>pCode</span> <span class='kw'>&lt;-</span> <span class='st'>'00060'</span></div><div class='input'><span class='no'>rawDailyQ</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdv</span>(<span class='no'>site_id</span>,<span class='no'>pCode</span>, <span class='no'>startDate</span>, <span class='no'>endDate</span>)
<span class='no'>rawDailyQAndTempMeanMax</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdv</span>(<span class='no'>site_id</span>,<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>'00010'</span>,<span class='st'>'00060'</span>),
<span class='no'>startDate</span>, <span class='no'>endDate</span>, <span class='kw'>statCd</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>'00001'</span>,<span class='st'>'00003'</span>))
<span class='no'>rawDailyQAndTempMeanMax</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='renameNWISColumns.html'>renameNWISColumns</a></span>(<span class='no'>rawDailyQAndTempMeanMax</span>)
......@@ -199,13 +198,19 @@ and S is the statistic code (if applicable).</p>
<span class='no'>startDate</span>, <span class='no'>endDate</span>, <span class='kw'>statCd</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>'00001'</span>,<span class='st'>'00003'</span>))
<span class='co'># Site with no data:</span>
<span class='no'>x</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdv</span>(<span class='st'>"10258500"</span>,<span class='st'>"00060"</span>, <span class='st'>"2014-09-08"</span>, <span class='st'>"2014-09-14"</span>)
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/names'>names</a></span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/attributes'>attributes</a></span>(<span class='no'>x</span>))
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/attr'>attr</a></span>(<span class='no'>x</span>, <span class='st'>"siteInfo"</span>)
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/attr'>attr</a></span>(<span class='no'>x</span>, <span class='st'>"variableInfo"</span>)
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/names'>names</a></span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/attributes'>attributes</a></span>(<span class='no'>x</span>))</div><div class='output co'>#&gt; [1] "names" "row.names" "url" "siteInfo"
#&gt; [5] "variableInfo" "disclaimer" "statisticInfo" "queryTime"
#&gt; [9] "class" </div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/attr'>attr</a></span>(<span class='no'>x</span>, <span class='st'>"siteInfo"</span>)</div><div class='output co'>#&gt; station_nm site_no agency_cd timeZoneOffset
#&gt; 1 PALM CYN C NR PALM SPRINGS CA 10258500 USGS -08:00
#&gt; timeZoneAbbreviation dec_lat_va dec_lon_va srs siteTypeCd hucCd
#&gt; 1 PST 33.74502 -116.5356 EPSG:4326 ST 18100201
#&gt; stateCd countyCd network
#&gt; 1 06 06065 NWIS</div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/attr'>attr</a></span>(<span class='no'>x</span>, <span class='st'>"variableInfo"</span>)</div><div class='output co'>#&gt; variableCode variableName variableDescription
#&gt; 1 00060 Streamflow, ft&amp;#179;/s Discharge, cubic feet per second
#&gt; valueType unit options noDataValue
#&gt; 1 Derived Value ft3/s Mean NA</div><div class='input'>
<span class='no'>site</span> <span class='kw'>&lt;-</span> <span class='st'>"05212700"</span>
<span class='no'>notActive</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdv</span>(<span class='no'>site</span>, <span class='st'>"00060"</span>, <span class='st'>"2014-01-01"</span>,<span class='st'>"2014-01-07"</span>)
<span class='co'># }</span></pre>
<span class='no'>notActive</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISdv</span>(<span class='no'>site</span>, <span class='st'>"00060"</span>, <span class='st'>"2014-01-01"</span>,<span class='st'>"2014-01-07"</span>)</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
......
......@@ -202,14 +202,12 @@ for more information on time zones.</p></td>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='no'>site_id</span> <span class='kw'>&lt;-</span> <span class='st'>"434400121275801"</span></div><span class='co'># NOT RUN {</span>
<span class='no'>data</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISgwl</span>(<span class='no'>site_id</span>, <span class='st'>''</span>,<span class='st'>''</span>)
<pre class="examples"><div class='input'><span class='no'>site_id</span> <span class='kw'>&lt;-</span> <span class='st'>"434400121275801"</span></div><div class='input'><span class='no'>data</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISgwl</span>(<span class='no'>site_id</span>, <span class='st'>''</span>,<span class='st'>''</span>)
<span class='no'>sites</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"434400121275801"</span>, <span class='st'>"375907091432201"</span>)
<span class='no'>data2</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISgwl</span>(<span class='no'>site_id</span>, <span class='st'>''</span>,<span class='st'>''</span>)
<span class='no'>data3</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISgwl</span>(<span class='st'>"420125073193001"</span>, <span class='st'>''</span>,<span class='st'>''</span>)
<span class='co'>#handling of data where date has no day</span>
<span class='no'>data4</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISgwl</span>(<span class='st'>"425957088141001"</span>, <span class='kw'>startDate</span> <span class='kw'>=</span> <span class='st'>"1980-01-01"</span>)
<span class='co'># }</span></pre>
<span class='no'>data4</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISgwl</span>(<span class='st'>"425957088141001"</span>, <span class='kw'>startDate</span> <span class='kw'>=</span> <span class='st'>"1980-01-01"</span>)</div><div class='output co'>#&gt; <span class='message'>Not all dates were converted to Date object. Returning raw text for date columns.</span></div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
......
......@@ -200,13 +200,11 @@ for help on the columns and codes.</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='no'>site_ids</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>'01594440'</span>,<span class='st'>'040851325'</span>)</div><span class='co'># NOT RUN {</span>
<span class='no'>data</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISmeas</span>(<span class='no'>site_ids</span>)
<pre class="examples"><div class='input'><span class='no'>site_ids</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>'01594440'</span>,<span class='st'>'040851325'</span>)</div><div class='input'><span class='no'>data</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISmeas</span>(<span class='no'>site_ids</span>)
<span class='no'>Meas05316840</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISmeas</span>(<span class='st'>"05316840"</span>)
<span class='no'>Meas05316840.ex</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISmeas</span>(<span class='st'>"05316840"</span>,<span class='kw'>expanded</span><span class='kw'>=</span><span class='fl'>TRUE</span>)
<span class='no'>Meas07227500.ex</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISmeas</span>(<span class='st'>"07227500"</span>,<span class='kw'>expanded</span><span class='kw'>=</span><span class='fl'>TRUE</span>)
<span class='no'>Meas07227500.exRaw</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISmeas</span>(<span class='st'>"07227500"</span>,<span class='kw'>expanded</span><span class='kw'>=</span><span class='fl'>TRUE</span>, <span class='kw'>convertType</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='co'># }</span></pre>
<span class='no'>Meas07227500.exRaw</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISmeas</span>(<span class='st'>"07227500"</span>,<span class='kw'>expanded</span><span class='kw'>=</span><span class='fl'>TRUE</span>, <span class='kw'>convertType</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
......
......@@ -199,12 +199,10 @@ numerics based on a standard algorithm. If false, everything is returned as a ch
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='no'>site_ids</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>'01594440'</span>,<span class='st'>'040851325'</span>)</div><span class='co'># NOT RUN {</span>
<span class='no'>data</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISpeak</span>(<span class='no'>site_ids</span>)
<pre class="examples"><div class='input'><span class='no'>site_ids</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>'01594440'</span>,<span class='st'>'040851325'</span>)</div><div class='input'><span class='no'>data</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISpeak</span>(<span class='no'>site_ids</span>)
<span class='no'>data2</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISpeak</span>(<span class='no'>site_ids</span>, <span class='kw'>asDateTime</span><span class='kw'>=</span><span class='fl'>FALSE</span>)
<span class='no'>stations</span><span class='kw'>&lt;-</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"06011000"</span>)
<span class='no'>peakdata</span><span class='kw'>&lt;-</span><span class='fu'>readNWISpeak</span>(<span class='no'>stations</span>,<span class='kw'>convertType</span><span class='kw'>=</span><span class='fl'>FALSE</span>)
<span class='co'># }</span></pre>
<span class='no'>peakdata</span><span class='kw'>&lt;-</span><span class='fu'>readNWISpeak</span>(<span class='no'>stations</span>,<span class='kw'>convertType</span><span class='kw'>=</span><span class='fl'>FALSE</span>)</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
......
......@@ -239,8 +239,7 @@ for more information on time zones.</p></td>
<pre class="examples"><div class='input'><span class='no'>site_ids</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>'04024430'</span>,<span class='st'>'04024000'</span>)
<span class='no'>startDate</span> <span class='kw'>&lt;-</span> <span class='st'>'2010-01-01'</span>
<span class='no'>endDate</span> <span class='kw'>&lt;-</span> <span class='st'>''</span>
<span class='no'>parameterCd</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>'34247'</span>,<span class='st'>'30234'</span>,<span class='st'>'32104'</span>,<span class='st'>'34220'</span>)</div><span class='co'># NOT RUN {</span>
<span class='no'>rawNWISqwData</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISqw</span>(<span class='no'>site_ids</span>,<span class='no'>parameterCd</span>,<span class='no'>startDate</span>,<span class='no'>endDate</span>)
<span class='no'>parameterCd</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>'34247'</span>,<span class='st'>'30234'</span>,<span class='st'>'32104'</span>,<span class='st'>'34220'</span>)</div><div class='input'><span class='no'>rawNWISqwData</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISqw</span>(<span class='no'>site_ids</span>,<span class='no'>parameterCd</span>,<span class='no'>startDate</span>,<span class='no'>endDate</span>)
<span class='no'>rawNWISqwDataReshaped</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISqw</span>(<span class='no'>site_ids</span>,<span class='no'>parameterCd</span>,
<span class='no'>startDate</span>,<span class='no'>endDate</span>,<span class='kw'>reshape</span><span class='kw'>=</span><span class='fl'>TRUE</span>)
<span class='no'>parameterCd</span> <span class='kw'>&lt;-</span> <span class='st'>"all"</span>
......@@ -253,9 +252,7 @@ for more information on time zones.</p></td>
<span class='no'>rawNWISNutOpe</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISqw</span>(<span class='no'>site_ids</span>,<span class='no'>groups</span>,
<span class='no'>startDate</span>,<span class='no'>endDate</span>)
<span class='no'>rawNWISOpe</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISqw</span>(<span class='no'>site_ids</span>,<span class='st'>"OPE"</span>,
<span class='no'>startDate</span>,<span class='no'>endDate</span>)
<span class='co'># }</span></pre>
<span class='no'>startDate</span>,<span class='no'>endDate</span>)</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
......
......@@ -181,10 +181,10 @@ relate flow to stage.</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='no'>site_id</span> <span class='kw'>&lt;-</span> <span class='st'>'01594440'</span></div><span class='co'># NOT RUN {</span>
<span class='no'>data</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISrating</span>(<span class='no'>site_id</span>, <span class='st'>"base"</span>)
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/attr'>attr</a></span>(<span class='no'>data</span>, <span class='st'>"RATING"</span>)
<span class='co'># }</span></pre>
<pre class="examples"><div class='input'><span class='no'>site_id</span> <span class='kw'>&lt;-</span> <span class='st'>'01594440'</span></div><div class='input'><span class='no'>data</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISrating</span>(<span class='no'>site_id</span>, <span class='st'>"base"</span>)
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/attr'>attr</a></span>(<span class='no'>data</span>, <span class='st'>"RATING"</span>)</div><div class='output co'>#&gt; [1] "ID=20.0" "TYPE=STGQ" "NAME=stage-discharge"
#&gt; [4] "AGING=Working" "REMARKS=" "EXPANSION=logarithmic"
#&gt; [7] "OFFSET1=2.000000E+00" </div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
......
......@@ -196,10 +196,8 @@
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='no'>siteINFO</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISsite</span>(<span class='st'>'05114000'</span>)
<span class='no'>siteINFOMulti</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISsite</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>'05114000'</span>,<span class='st'>'09423350'</span>))
<span class='co'># }</span></pre>
<pre class="examples"><div class='input'><span class='no'>siteINFO</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISsite</span>(<span class='st'>'05114000'</span>)
<span class='no'>siteINFOMulti</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISsite</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>'05114000'</span>,<span class='st'>'09423350'</span>))</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
......
......@@ -194,24 +194,26 @@ at <a href='https://waterservices.usgs.gov/rest/Statistics-Service.html'>https:/
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><span class='co'># NOT RUN {</span>
<span class='no'>x1</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISstat</span>(<span class='kw'>siteNumbers</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"02319394"</span>),
<pre class="examples"><div class='input'><span class='no'>x1</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISstat</span>(<span class='kw'>siteNumbers</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"02319394"</span>),
<span class='kw'>parameterCd</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"00060"</span>),
<span class='kw'>statReportType</span><span class='kw'>=</span><span class='st'>"annual"</span>)
<span class='kw'>statReportType</span><span class='kw'>=</span><span class='st'>"annual"</span>)</div><div class='output co'>#&gt; <span class='message'>Please be aware the NWIS data service feeding this function is in BETA.</span>
#&gt; <span class='message'></span>
#&gt; <span class='message'> Data formatting could be changed at any time, and is not guaranteed</span></div><div class='input'>
<span class='co'>#all the annual mean discharge data for two sites</span>
<span class='no'>x2</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISstat</span>(<span class='kw'>siteNumbers</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"02319394"</span>,<span class='st'>"02171500"</span>),
<span class='kw'>parameterCd</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"00010"</span>,<span class='st'>"00060"</span>),
<span class='kw'>statReportType</span><span class='kw'>=</span><span class='st'>"annual"</span>)
<span class='kw'>statReportType</span><span class='kw'>=</span><span class='st'>"annual"</span>)</div><div class='output co'>#&gt; <span class='message'>Please be aware the NWIS data service feeding this function is in BETA.</span>
#&gt; <span class='message'></span>
#&gt; <span class='message'> Data formatting could be changed at any time, and is not guaranteed</span></div><div class='input'>
<span class='co'>#Request p25, p75, and mean values for temperature and discharge for the 2000s</span>
<span class='co'>#Note that p25 and p75 were not available for temperature, and return NAs</span>
<span class='no'>x</span> <span class='kw'>&lt;-</span> <span class='fu'>readNWISstat</span>(<span class='kw'>siteNumbers</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"02171500"</span>),
<span class='kw'>parameterCd</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"00010"</span>,<span class='st'>"00060"</span>),
<span class='kw'>statReportType</span><span class='kw'>=</span><span class='st'>"daily"</span>,
<span class='kw'>statType</span><span class='kw'>=</span><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"mean"</span>,<span class='st'>"median"</span>),
<span class='kw'>startDate</span><span class='kw'>=</span><span class='st'>"2000"</span>,<span class='kw'>endDate</span><span class='kw'>=</span><span class='st'>"2010"</span>)
<span class='co'># }</span></pre>
<span class='kw'>startDate</span><span class='kw'>=</span><span class='st'>"2000"</span>,<span class='kw'>endDate</span><span class='kw'>=</span><span class='st'>"2010"</span>)</div><div class='output co'>#&gt; <span class='message'>Please be aware the NWIS data service feeding this function is in BETA.</span>
#&gt; <span class='message'></span>
#&gt; <span class='message'> Data formatting could be changed at any time, and is not guaranteed</span></div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment