Maintenance scheduled for Thursday, January 27th at 15:00 MST. Expected downtime <1 hour.

Commit 7acb0451 authored by Laura A DeCicco's avatar Laura A DeCicco
Browse files

Try the try

parent 895a6778
......@@ -20,9 +20,7 @@ jobs:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-16.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest", http-user-agent: "R/4.0.0 (ubuntu-16.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
- {os: ubuntu-16.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
- {os: ubuntu-18.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
......
......@@ -21,6 +21,7 @@
#' @export
#' @seealso \code{\link{importRDB1}}
#' @examples
#' if(!httr::http_error("https://waterservices.usgs.gov")){
#' paramINFO <- readNWISpCode(c('01075','00060','00931'))
#' paramINFO <- readNWISpCode(c('01075','00060','00931', NA))
readNWISpCode <- function(parameterCd){
......
......@@ -61,8 +61,10 @@
#' @export
#' @examples
#' \donttest{
#' try({
#' siteINFO <- readNWISsite('05114000')
#' siteINFOMulti <- readNWISsite(c('05114000','09423350'))
#' })
#' }
readNWISsite <- function(siteNumbers){
......
......@@ -54,6 +54,7 @@
#' startDate <- "2014-10-10"
#' endDate <- "2014-10-10"
#' \donttest{
#' try({
#' rawData <- readNWISuv(site_id,parameterCd,startDate,endDate)
#'
#' rawData_today <- readNWISuv(site_id, parameterCd, Sys.Date(),Sys.Date())
......@@ -68,8 +69,8 @@
#' # Adding 'Z' to the time indicates to the web service to call the data with UTC time:
#' GMTdata <- readNWISuv(site_id,parameterCd,
#' "2014-10-10T00:00Z", "2014-10-10T23:59Z")
#' })
#' }
#'
readNWISuv <- function (siteNumbers,parameterCd,startDate="",endDate="", tz="UTC"){
if(as.character(startDate) == "" || (as.Date(startDate) <= Sys.Date()-120)){
......
......@@ -51,6 +51,7 @@
#' @export
#' @examples
#' \donttest{
#' try({
#' availableData <- whatNWISdata(siteNumber = '05114000')
#' # To find just unit value ('instantaneous') data:
#' uvData <- whatNWISdata(siteNumber = '05114000',service="uv")
......@@ -58,6 +59,7 @@
#' flowAndTemp <- whatNWISdata(stateCd = "WI", service = "uv",
#' parameterCd = c("00060","00010"),
#' statCd = "00003")
#' })
#' }
whatNWISdata <- function(..., convertType=TRUE){
......
......@@ -30,8 +30,10 @@
#'
#' @examples
#' \donttest{
#' try({
#' siteListPhos <- whatNWISsites(stateCd="OH",parameterCd="00665")
#' oneSite <- whatNWISsites(sites="05114000")
#' })
#' }
whatNWISsites <- function(...){
......
......@@ -3,10 +3,12 @@
#' @export
#' @examples
#' \donttest{
#' try({
#' site1 <- whatWQPsamples(siteid="USGS-01594440")
#'
#' type <- "Stream"
#' sites <- whatWQPsamples(countycode="US:55:025",siteType=type)
#' })
#' }
whatWQPsamples <- function(...){
......
......@@ -58,12 +58,14 @@
#' @seealso whatNWISdata
#' @examples
#' \donttest{
#' try({
#' site1 <- whatWQPsites(siteid="USGS-01594440")
#'
#' type <- "Stream"
#' sites <- whatWQPsites(countycode="US:55:025",
#' characteristicName = "Phosphorus",
#' siteType=type)
#' })
#' }
whatWQPsites <- function(...){
......
......@@ -27,10 +27,6 @@ parameterData data frame with the following information:
Imports data from NWIS about meaured parameter based on user-supplied parameter code or codes.
This function gets the data from here: \url{https://nwis.waterdata.usgs.gov/nwis/pmcodes}
}
\examples{
paramINFO <- readNWISpCode(c('01075','00060','00931'))
paramINFO <- readNWISpCode(c('01075','00060','00931', NA))
}
\seealso{
\code{\link{importRDB1}}
}
......
......@@ -70,8 +70,10 @@ Imports data from USGS site file site. This function gets data from here: \url{h
}
\examples{
\donttest{
try({
siteINFO <- readNWISsite('05114000')
siteINFOMulti <- readNWISsite(c('05114000','09423350'))
})
}
}
\keyword{USGS}
......
......@@ -65,6 +65,7 @@ parameterCd <- '00060'
startDate <- "2014-10-10"
endDate <- "2014-10-10"
\donttest{
try({
rawData <- readNWISuv(site_id,parameterCd,startDate,endDate)
rawData_today <- readNWISuv(site_id, parameterCd, Sys.Date(),Sys.Date())
......@@ -79,8 +80,8 @@ centralTime <- readNWISuv(site_id,parameterCd,
# Adding 'Z' to the time indicates to the web service to call the data with UTC time:
GMTdata <- readNWISuv(site_id,parameterCd,
"2014-10-10T00:00Z", "2014-10-10T23:59Z")
})
}
}
\seealso{
\code{\link{renameNWISColumns}}, \code{\link{importWaterML1}}
......
......@@ -61,6 +61,7 @@ for more information.
}
\examples{
\donttest{
try({
availableData <- whatNWISdata(siteNumber = '05114000')
# To find just unit value ('instantaneous') data:
uvData <- whatNWISdata(siteNumber = '05114000',service="uv")
......@@ -68,6 +69,7 @@ uvDataMulti <- whatNWISdata(siteNumber = c('05114000','09423350'),service=c("uv"
flowAndTemp <- whatNWISdata(stateCd = "WI", service = "uv",
parameterCd = c("00060","00010"),
statCd = "00003")
})
}
}
\keyword{USGS}
......
......@@ -36,7 +36,9 @@ Mapper format is used
}
\examples{
\donttest{
try({
siteListPhos <- whatNWISsites(stateCd="OH",parameterCd="00665")
oneSite <- whatNWISsites(sites="05114000")
})
}
}
......@@ -73,10 +73,12 @@ The \code{readWQPsummary} function has
}
\examples{
\donttest{
try({
site1 <- whatWQPsamples(siteid="USGS-01594440")
type <- "Stream"
sites <- whatWQPsamples(countycode="US:55:025",siteType=type)
})
}
\donttest{
......@@ -85,12 +87,14 @@ sites <- whatWQPmetrics(countycode="US:55:025",siteType=type)
lakeSites <- whatWQPmetrics(siteType = "Lake, Reservoir, Impoundment", statecode = "US:55")
}
\donttest{
try({
site1 <- whatWQPsites(siteid="USGS-01594440")
type <- "Stream"
sites <- whatWQPsites(countycode="US:55:025",
characteristicName = "Phosphorus",
siteType=type)
})
}
\donttest{
site1 <- readWQPsummary(siteid="USGS-07144100",
......
Markdown is supported
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