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

Unverified Commit b60c41a2 authored by Laura A DeCicco's avatar Laura A DeCicco Committed by GitHub
Browse files

Merge pull request #582 from ldecicco-USGS/master

Try some new roxygen2 fanciness
parents 87705271 9be10fc9
......@@ -32,6 +32,8 @@ vignettes/usMaps_cache
vignettes/movingAverages.Rmd
vignettes/tutorial_slides.Rmd
vignettes/nldi*
vignettes/phWI.rds
vignettes/az_data.rds
vignettes/atascadero-creek-nldi.png
vignettes/ucsb.png
man/figures/highrezlogo-01.png
......
......@@ -21,7 +21,7 @@ jobs:
- name: Install pak and query dependencies
run: |
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
install.packages(c("maptools", "maps", "patchwork"))
install.packages(c("DT", "leaflet", "zoo", "maps", "patchwork"))
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
shell: Rscript {0}
......@@ -44,7 +44,6 @@ jobs:
- name: Deploy package
run: |
Sys.setenv(CI = FALSE)
options(rmarkdown.html_vignette.check_title = FALSE)
pkgdown::deploy_to_branch(new_process = FALSE)
shell: Rscript {0}
......@@ -55,4 +55,4 @@ BuildVignettes: true
VignetteBuilder: knitr
BugReports: https://github.com/USGS-R/dataRetrieval/issues
URL: https://pubs.usgs.gov/tm/04/a10/
RoxygenNote: 7.1.1
RoxygenNote: 7.1.2
......@@ -16,6 +16,7 @@ export(importRDB1)
export(importWQP)
export(importWaterML1)
export(importWaterML2)
export(is_dataRetrieval_user)
export(pCodeToName)
export(parameterCdFile)
export(readNGWMNdata)
......
......@@ -5,3 +5,16 @@ pkg.env <- new.env()
pkg.env$nldi_base <- "https://labs.waterdata.usgs.gov/api/nldi/linked-data/"
pkg.env$local_sf <- requireNamespace("sf", quietly = TRUE)
}
#' Is this a dataRetrieval user
#'
#' Reveals if this is a user or not
#' @export
#' @examples
#' is_dataRetrieval_user()
is_dataRetrieval_user <- function(){
interactive() ||
!identical(Sys.getenv("CI"), "") ||
identical(Sys.getenv("NOT_CRAN"), "true")
}
......@@ -225,7 +225,7 @@ valid_ask = function(all, type) {
#' @return a list of data.frames if sf is not installed, a list of sf objects if it is
#' @export
#' @keywords nldi
#' @examples
#' @examplesIf is_dataRetrieval_user()
#' \donttest{
#' # Find Features / Define origin features
#'
......
......@@ -10,7 +10,7 @@
#' @importFrom xml2 read_xml
#' @export
#' @return raw data from web services
#' @examples
#' @examplesIf is_dataRetrieval_user()
#' siteNumber <- "02177000"
#' startDate <- "2012-09-01"
#' endDate <- "2012-10-01"
......
......@@ -136,7 +136,7 @@ importNGWMN <- function(input, asDateTime=FALSE, tz="UTC"){
#' "America/Anchorage","America/Honolulu","America/Jamaica","America/Managua","America/Phoenix", and "America/Metlakatla"
#' @importFrom xml2 xml_attr xml_find_all xml_text
#' @export
#' @examples
#' @examplesIf is_dataRetrieval_user()
#' baseURL <- "https://waterservices.usgs.gov/nwis/dv/?format=waterml,2.0"
#' URL <- paste(baseURL, "sites=01646500",
#' "startDT=2014-09-01",
......
......@@ -42,7 +42,7 @@
#' comment \tab character \tab Header comments from the RDB file \cr
#' }
#' @export
#' @examples
#' @examplesIf is_dataRetrieval_user()
#' site_id <- "02177000"
#' startDate <- "2012-09-01"
#' endDate <- "2012-10-01"
......
......@@ -15,7 +15,7 @@
#' start and end times, and converted to UTC. See \url{https://www.waterqualitydata.us/portal_userguide/} for more information.
#' @export
#' @seealso \code{\link{readWQPdata}}, \code{\link{readWQPqw}}, \code{\link{whatWQPsites}}
#' @examples
#' @examplesIf is_dataRetrieval_user()
#' # These examples require an internet connection to run
#'
#' ## Examples take longer than 5 seconds:
......
......@@ -47,7 +47,7 @@
#' @importFrom xml2 xml_attrs
#' @importFrom xml2 xml_attr
#' @importFrom xml2 xml_root
#' @examples
#' @examplesIf is_dataRetrieval_user()
#' site_id <- "02177000"
#' startDate <- "2012-09-01"
#' endDate <- "2012-10-01"
......
......@@ -12,7 +12,7 @@
#' "America/Jamaica","America/Managua","America/Phoenix", and "America/Metlakatla". See also \code{OlsonNames()}
#' for more information on time zones.
#' @export
#' @examples
#' @examplesIf is_dataRetrieval_user()
#' \donttest{
#' #one site
#' site <- "USGS.430427089284901"
......
......@@ -53,7 +53,7 @@
#'
#' @seealso \code{\link{renameNWISColumns}}, \code{\link{importWaterML1}}, \code{\link{importRDB1}}
#' @export
#' @examples
#' @examplesIf is_dataRetrieval_user()
#' \donttest{
#' # Examples not run for time considerations
#'
......
......@@ -37,7 +37,7 @@
#' @seealso \code{\link{renameNWISColumns}}, \code{\link{importWaterML1}}
#' @export
#' @keywords data import USGS web service
#' @examples
#' @examplesIf is_dataRetrieval_user()
#' site_id <- '04085427'
#' startDate <- '2012-01-01'
#' endDate <- '2012-06-30'
......
......@@ -59,7 +59,7 @@
#' comment \tab character \tab Header comments from the RDB file \cr
#' }
#' @export
#' @examples
#' @examplesIf is_dataRetrieval_user()
#' \donttest{
#'
#' siteINFO <- readNWISsite('05114000')
......
......@@ -48,7 +48,7 @@
#'
#' @seealso \code{\link{renameNWISColumns}}, \code{\link{importWaterML1}}
#' @export
#' @examples
#' @examplesIf is_dataRetrieval_user()
#' site_id <- '05114000'
#' parameterCd <- '00060'
#' startDate <- "2014-10-10"
......@@ -130,7 +130,7 @@ readNWISuv <- function (siteNumbers,parameterCd,startDate="",endDate="", tz="UTC
#' }
#' @seealso \code{\link{constructNWISURL}}, \code{\link{importRDB1}}
#' @export
#' @examples
#' @examplesIf is_dataRetrieval_user()
#' site_ids <- c('01594440','040851325')
#' \donttest{
#' data <- readNWISpeak(site_ids)
......@@ -213,7 +213,7 @@ readNWISpeak <- function (siteNumbers,startDate="",endDate="", asDateTime=TRUE,
#'relate flow to stage.
#' @seealso \code{\link{constructNWISURL}}, \code{\link{importRDB1}}
#' @export
#' @examples
#' @examplesIf is_dataRetrieval_user()
#' site_id <- '01594440'
#' \donttest{
#' data <- readNWISrating(site_id, "base")
......@@ -294,7 +294,7 @@ readNWISrating <- function (siteNumber,type="base",convertType = TRUE){
#' }
#' @seealso \code{\link{constructNWISURL}}, \code{\link{importRDB1}}
#' @export
#' @examples
#' @examplesIf is_dataRetrieval_user()
#' site_ids <- c('01594440','040851325')
#' \donttest{
#' data <- readNWISmeas(site_ids)
......@@ -401,7 +401,7 @@ readNWISmeas <- function (siteNumbers,startDate="",endDate="", tz="UTC", expande
#'
#' @seealso \code{\link{constructNWISURL}}, \code{\link{importRDB1}}
#' @export
#' @examples
#' @examplesIf is_dataRetrieval_user()
#' site_id <- "434400121275801"
#' \donttest{
#' data <- readNWISgwl(site_id)
......@@ -478,7 +478,7 @@ readNWISgwl <- function(siteNumbers, startDate = "", endDate = "",
#' }
#' @seealso \code{\link{constructNWISURL}}, \code{\link{importRDB1}}
#' @export
#' @examples
#' @examplesIf is_dataRetrieval_user()
#' \donttest{
#' x1 <- readNWISstat(siteNumbers=c("02319394"),
#' parameterCd=c("00060"),
......@@ -549,7 +549,7 @@ readNWISstat <- function(siteNumbers, parameterCd, startDate = "", endDate = "",
#' County and state fields will be included as appropriate.
#'
#' @export
#' @examples
#' @examplesIf is_dataRetrieval_user()
#' \donttest{
#' #All data for a county
#' allegheny <- readNWISuse(stateCd = "Pennsylvania",countyCd = "Allegheny")
......
......@@ -93,7 +93,7 @@
#' queryTime \tab POSIXct \tab The time the data was returned \cr
#' }
#' @export
#' @examples
#' @examplesIf is_dataRetrieval_user()
#' \donttest{
#' nameToUse <- "pH"
#' pHData <- readWQPdata(siteid="USGS-04024315",characteristicName=nameToUse)
......
......@@ -104,7 +104,7 @@
#' @export
#' @seealso \code{\link{readWQPdata}}, \code{\link{whatWQPsites}},
#' \code{\link{readNWISqw}}, and \code{\link{importWQP}}
#' @examples
#' @examplesIf is_dataRetrieval_user()
#' \donttest{
#' rawPcode <- readWQPqw('USGS-01594440','01075', '', '')
#' rawCharacteristicName <- readWQPqw('WIDNR_WQX-10032762','Specific conductance', '', '')
......
......@@ -49,7 +49,7 @@
#' queryTime \tab POSIXct \tab The time the data was returned \cr
#' }
#' @export
#' @examples
#' @examplesIf is_dataRetrieval_user()
#' \donttest{
#'
#' availableData <- whatNWISdata(siteNumber = '05114000')
......
......@@ -126,7 +126,7 @@ whatWQPmetrics <- function(...){
#'
#' @export
#' @seealso whatNWISsites
#' @examples
#' @examplesIf is_dataRetrieval_user()
#' \donttest{
#' site1 <- whatWQPdata(siteid="USGS-01594440")
#'
......
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