diff --git a/.Rbuildignore b/.Rbuildignore new file mode 100644 index 0000000..fcf76b7 --- /dev/null +++ b/.Rbuildignore @@ -0,0 +1,4 @@ +^.*\.Rproj$ +^\.Rproj\.user$ +travis.yml + diff --git a/.travis.yml b/.travis.yml index e8907d7..312ec83 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,38 +1,46 @@ -# Sample .travis.yml for R projects from https://github.com/craigcitro/r-travis +# Sample .travis.yml for R projects. +# +# See README.md for instructions, or for more configuration options, +# see the wiki: +# https://github.com/craigcitro/r-travis/wiki -language: c +language: r +cache: packages +dist: trusty -os: - - osx - - linux +matrix: + include: + - os: linux + r: release + env: R_CODECOV=true + +addons: + apt: + packages: + - libcurl4-openssl-dev env: global: - - CRAN: http://cran.rstudio.com - R_BUILD_ARGS="--no-build-vignettes --no-manual" - R_CHECK_ARGS="--no-build-vignettes --no-manual --as-cran" - - BOOTSTRAP_LATEX="" - - NOT_CRAN="true" + - NOT_CRAN="true" + - _R_CHECK_FORCE_SUGGESTS_=false + +warnings_are_errors: true -script: "./travis-tool.sh run_tests" +r_github_packages: + - jimhester/covr + - USGS-R/smwrData + - USGS-R/smwrBase + - USGS-R/smwrGraphs + - USGS-R/smwrStats + - USGS-R/smwrQW -before_script: - - curl -OL http://raw.github.com/craigcitro/r-travis/master/scripts/travis-tool.sh - - chmod 755 ./travis-tool.sh - - "./travis-tool.sh bootstrap" - - "./travis-tool.sh aptget_install r-cran-rodbc" - - "./travis-tool.sh install_deps - ./travis-tool.sh install_r methods stats digest memoise testthat KernSmooth akima lubridate dataRetrieval car leaps boot coin XML evd stats4 robust randtests - survival XML zCompositions NADA psych" - - "./travis-tool.sh install_github USGS-R/smwrData" - - "./travis-tool.sh install_github USGS-R/smwrBase" - - "./travis-tool.sh install_github USGS-R/smwrGraphs" - - "./travis-tool.sh install_github USGS-R/smwrStats" - - "./travis-tool.sh install_github USGS-R/smwrQW" +after_success: + - if [[ "${R_CODECOV}" ]]; then R -e 'covr::coveralls()'; fi -after_script: - - "./travis-tool.sh dump_logs" - notifications: email: on_success: change on_failure: change + diff --git a/DESCRIPTION b/DESCRIPTION index c34274a..2008586 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: DVstats -Version: 0.3.3 +Version: 0.3.3.9000 Date: 2016-01-25 Title: Functions to manipulate daily-values data Author: Dave Lorenz @@ -71,4 +71,4 @@ Collate: 'setSeasons.R' 'subset.fall.R' 'wtf.R' -RoxygenNote: 5.0.1 +RoxygenNote: 6.0.1 diff --git a/NAMESPACE b/NAMESPACE index e18c51e..8cb1f34 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -56,6 +56,13 @@ import(smwrGraphs) import(smwrQW) import(smwrStats) import(stats) +importFrom(grDevices,dev.off) +importFrom(graphics,par) +importFrom(graphics,plot) +importFrom(graphics,plot.new) +importFrom(graphics,text) importFrom(robust,lmRob) importFrom(stats4,mle) +importFrom(utils,capture.output) +importFrom(utils,menu) useDynLib(DVstats,roraf) diff --git a/R/plot.baseflow.R b/R/plot.baseflow.R index aa77f94..7a1748e 100644 --- a/R/plot.baseflow.R +++ b/R/plot.baseflow.R @@ -15,6 +15,9 @@ #' @seealso \code{\link{bfi}}, \code{\link{hysep}}, \code{\link{part}}, #' @keywords hplot #' @method plot baseflow +#' @importFrom grDevices dev.off +#' @importFrom graphics par plot plot.new text +#' @importFrom utils capture.output menu #' @export plot.baseflow <- function(x, which = "All", set.up = TRUE, ...) { STAID <- attr(x, "STAID") diff --git a/README.md b/README.md index 5dd49e8..2674de3 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ USGS water science R functions for the analysis of daily-values data. Disclaimer ---------- -This software is in the public domain because it contains materials that originally came from the U.S. Geological Survey, an agency of the United States Department of Interior. For more information, see the official USGS copyright policy at [http://www.usgs.gov/visual-id/credit_usgs.html#copyright](http://www.usgs.gov/visual-id/credit_usgs.html#copyright) +This software is in the public domain because it contains materials that originally came from the U.S. Geological Survey, an agency of the United States Department of Interior. For more information, see the official USGS copyright policy at [https://www.usgs.gov/visual-id/credit_usgs.html#copyright](https://www.usgs.gov/visual-id/credit_usgs.html#copyright) Although this software program has been used by the U.S. Geological Survey (USGS), no warranty, expressed or implied, is made by the USGS or the U.S. Government as to the accuracy and functioning of the program and related program material nor shall the fact of distribution constitute any such warranty, and no responsibility is assumed by the USGS in connection therewith. @@ -16,9 +16,9 @@ Installation ```R install.packages("DVstats", - repos=c("http://owi.usgs.gov/R", + repos=c("https://owi.usgs.gov/R", "http://cran.us.r-project.org"), dependencies = TRUE) ``` -Linux: [![travis](https://travis-ci.org/USGS-R/smwrQW.svg?branch=master)](https://travis-ci.org/USGS-R/DVstats) \ No newline at end of file +Linux: [![travis](https://travis-ci.org/USGS-R/DVstats.svg?branch=master)](https://travis-ci.org/USGS-R/DVstats) \ No newline at end of file diff --git a/inst/doc/MasterRecessionCurve.pdf b/inst/doc/MasterRecessionCurve.pdf index be96bc4..54a97db 100644 Binary files a/inst/doc/MasterRecessionCurve.pdf and b/inst/doc/MasterRecessionCurve.pdf differ diff --git a/inst/doc/SevenDay.pdf b/inst/doc/SevenDay.pdf index 4fab8f1..56afcc3 100644 Binary files a/inst/doc/SevenDay.pdf and b/inst/doc/SevenDay.pdf differ diff --git a/man/DVstats-package.Rd b/man/DVstats-package.Rd index b0363cd..4ce34a0 100644 --- a/man/DVstats-package.Rd +++ b/man/DVstats-package.Rd @@ -2,8 +2,8 @@ % Please edit documentation in R/DVstats-package.R \docType{package} \name{DVstats-package} -\alias{DVstats} \alias{DVstats-package} +\alias{DVstats} \title{Functions for manipulating daily values} \description{ This package has specialized functions for managing or @@ -78,16 +78,15 @@ Support and miscellaneous functions.\cr \code{\link{seasonYearMD}}\cr #'\code{\link{setSeasons}}\cr } -\author{ -Dave Lorenz - -Maintainer: Dave Lorenz -} \references{ Need those for the various routines! } \seealso{ \code{\link[smwrData:smwrData-package]{smwrData}} } -\keyword{package} +\author{ +Dave Lorenz +Maintainer: Dave Lorenz +} +\keyword{package} diff --git a/man/Lognormal3.Rd b/man/Lognormal3.Rd index a2368d5..c29a5b3 100644 --- a/man/Lognormal3.Rd +++ b/man/Lognormal3.Rd @@ -1,8 +1,11 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/Lognormal3.R \name{dln3} -\alias{Lognormal3} \alias{dln3} +\alias{Lognormal3} +\alias{pln3} +\alias{qln3} +\alias{rln3} \alias{pln3} \alias{qln3} \alias{rln3} @@ -44,4 +47,3 @@ generation for the 3-parameter log normal distribution whose logarithm of the data minus lambda has mean equal to meanlog and standard deviation equal to sdlog. } - diff --git a/man/PredModels.Rd b/man/PredModels.Rd index 4c4bb3d..36067b4 100644 --- a/man/PredModels.Rd +++ b/man/PredModels.Rd @@ -22,4 +22,3 @@ Prediction Models The 13 regional prediction models for the points on a FDC. } \keyword{datasets} - diff --git a/man/QPPQ.Rd b/man/QPPQ.Rd index 9357037..e13b123 100644 --- a/man/QPPQ.Rd +++ b/man/QPPQ.Rd @@ -24,4 +24,3 @@ reference streamgage, and the FDCs for the reference and ungaged sites. Q-normal-log interpolation is used. This function can be applied anywhere the method is valid. } - diff --git a/man/aggregate.baseflow.Rd b/man/aggregate.baseflow.Rd index 0c13377..b71bfad 100644 --- a/man/aggregate.baseflow.Rd +++ b/man/aggregate.baseflow.Rd @@ -44,4 +44,3 @@ aggregate(G12.hysep) \code{\link{setSeasons}} } \keyword{baseflow} - diff --git a/man/aggregate.rise.Rd b/man/aggregate.rise.Rd index 1aa0efc..79c203e 100644 --- a/man/aggregate.rise.Rd +++ b/man/aggregate.rise.Rd @@ -41,4 +41,3 @@ aggregate(G12.rise) \code{\link{rise}}, \code{\link{setSeasons}} } \keyword{recharge} - diff --git a/man/aggregate.rora.Rd b/man/aggregate.rora.Rd index ac365fe..b6d6b00 100644 --- a/man/aggregate.rora.Rd +++ b/man/aggregate.rora.Rd @@ -34,4 +34,3 @@ created by \code{setSeasons}. If a character , thne must be "months," "years," \code{\link{rora}}, \code{\link{setSeasons}} } \keyword{recharge} - diff --git a/man/antecedentRR.Rd b/man/antecedentRR.Rd index 617f225..a0ce7c6 100644 --- a/man/antecedentRR.Rd +++ b/man/antecedentRR.Rd @@ -26,4 +26,3 @@ occuring before the first recession of at least 4 days, the recession rate is 0, replicates the \code{rise} function. } \keyword{recession} - diff --git a/man/baseDur.Rd b/man/baseDur.Rd index 55ac3e0..1e228e7 100644 --- a/man/baseDur.Rd +++ b/man/baseDur.Rd @@ -48,4 +48,3 @@ with(Q05078470, baseDur(FLOW, DATES, base=3, test=">=", STAID="05078470")) } } - diff --git a/man/bfi.Rd b/man/bfi.Rd index dfc3aa6..d97d3d7 100644 --- a/man/bfi.Rd +++ b/man/bfi.Rd @@ -71,4 +71,3 @@ Institute of Hydrology, 1980, Low flow studies: Wallingford, Oxon, United Kingdom, Report No. 3, p. 12- 19. } \keyword{baseflow} - diff --git a/man/climateYear.Rd b/man/climateYear.Rd index b88492e..fa905cb 100644 --- a/man/climateYear.Rd +++ b/man/climateYear.Rd @@ -37,4 +37,3 @@ climateYear(QW05078470$DATES) \code{\link{year}}, \code{\link{waterYear}} } \keyword{manip} - diff --git a/man/confirm.Rd b/man/confirm.Rd index 8169592..79a7cb6 100644 --- a/man/confirm.Rd +++ b/man/confirm.Rd @@ -18,4 +18,3 @@ The object returned depends on the specific method. Review and accept the results of an analysis } \keyword{manip} - diff --git a/man/confirm.fall.Rd b/man/confirm.fall.Rd index 933d8ab..9346664 100644 --- a/man/confirm.fall.Rd +++ b/man/confirm.fall.Rd @@ -25,4 +25,3 @@ This function processes the output of function \code{fall} and requires the user accept or reject the recession. } \keyword{manip} - diff --git a/man/confirm.recess.Rd b/man/confirm.recess.Rd index 7c4e155..330ed69 100644 --- a/man/confirm.recess.Rd +++ b/man/confirm.recess.Rd @@ -24,4 +24,3 @@ The object \code{x} is returned with updated recessions This function processes the output of function \code{recess} and requires the user to accept or reject the recession. } - diff --git a/man/consistentFDC.Rd b/man/consistentFDC.Rd index 2fee45e..f570b78 100644 --- a/man/consistentFDC.Rd +++ b/man/consistentFDC.Rd @@ -16,4 +16,3 @@ a vector of 13 consitently decreasing estimates. \description{ Construct a consistent flow-duration curve from the 13 estiamtes from a regional regression. } - diff --git a/man/dvStat.Rd b/man/dvStat.Rd index 109cd2c..a0088ac 100644 --- a/man/dvStat.Rd +++ b/man/dvStat.Rd @@ -56,4 +56,3 @@ demo(package="DVstats") options(.pager) } } - diff --git a/man/estFDC.Rd b/man/estFDC.Rd index a5bb2e7..a8659c6 100644 --- a/man/estFDC.Rd +++ b/man/estFDC.Rd @@ -29,4 +29,3 @@ ungaged sites in Minnesota. The selected points on the FDC can also be obtained using StreamStats for Minnesota. } - diff --git a/man/extend.Rd b/man/extend.Rd index 3ed4e87..cde8f56 100644 --- a/man/extend.Rd +++ b/man/extend.Rd @@ -30,4 +30,3 @@ extend(XT) \code{\link{fillMissing}} } \keyword{manip} - diff --git a/man/fall.Rd b/man/fall.Rd index a48cf00..298e221 100644 --- a/man/fall.Rd +++ b/man/fall.Rd @@ -45,4 +45,3 @@ with(GlacialRidge, fall(G12, datetime, MPelev=1126.42)) } } \keyword{recession} - diff --git a/man/flowDurClasses.Rd b/man/flowDurClasses.Rd index 4162a5b..0a2efe1 100644 --- a/man/flowDurClasses.Rd +++ b/man/flowDurClasses.Rd @@ -23,4 +23,3 @@ Compute tables of class-limit flow values, class \references{ USGS SWSTATS? } - diff --git a/man/freqAnal.Rd b/man/freqAnal.Rd index c0ac237..1962bba 100644 --- a/man/freqAnal.Rd +++ b/man/freqAnal.Rd @@ -70,4 +70,3 @@ with(ConecuhFlows, freqAnal(Flow, Year, desc="Annual Flows", STAID="02371500")) } } - diff --git a/man/freqReport.Rd b/man/freqReport.Rd index 4199cb5..a9b1c80 100644 --- a/man/freqReport.Rd +++ b/man/freqReport.Rd @@ -22,4 +22,3 @@ report contains the text output from \code{print(x)}, the estimated values of selected probabilities of exceedance, and a diagnostic plot for each fitted distribution. } - diff --git a/man/hmean.Rd b/man/hmean.Rd index ec5e786..b43e36f 100644 --- a/man/hmean.Rd +++ b/man/hmean.Rd @@ -22,4 +22,3 @@ Compute the harmonic mean accoring to the EPA DFLOW manual. Rossman, L.A., No Date, DFLOW user's manual: U.S. Environmental Protection Agency, Cincinnati, Ohio, 26 p. } - diff --git a/man/hysep.Rd b/man/hysep.Rd index e5cdb7c..e17bd81 100644 --- a/man/hysep.Rd +++ b/man/hysep.Rd @@ -54,4 +54,3 @@ U.S. geological Survey Water-Resources Investigations Report 96-4040. 46 p. } \keyword{baseflow} - diff --git a/man/join.Rd b/man/join.Rd index 1153fdf..aa916f3 100644 --- a/man/join.Rd +++ b/man/join.Rd @@ -20,4 +20,3 @@ recession in \code{x} and \code{value}. \description{ Append two recession analyses. } - diff --git a/man/part.Rd b/man/part.Rd index 8ffce26..eb1bee2 100644 --- a/man/part.Rd +++ b/man/part.Rd @@ -60,4 +60,3 @@ from streamflow records---Update: U.S. geological Survey Water-Resources Investi Report 98-4148. 43 p. } \keyword{baseflow} - diff --git a/man/plot.baseflow.Rd b/man/plot.baseflow.Rd index 5b51dc4..f2145cb 100644 --- a/man/plot.baseflow.Rd +++ b/man/plot.baseflow.Rd @@ -27,8 +27,8 @@ Plot an object of class "baseflow" from any baseflow analysis. \section{Side Effect}{ The object \code{x} is plotted } + \seealso{ \code{\link{bfi}}, \code{\link{hysep}}, \code{\link{part}}, } \keyword{hplot} - diff --git a/man/plot.fall.Rd b/man/plot.fall.Rd index b00264a..d398609 100644 --- a/man/plot.fall.Rd +++ b/man/plot.fall.Rd @@ -48,4 +48,3 @@ first color and the largest rates correspond to the last color. \code{\link{fall}} } \keyword{hplot} - diff --git a/man/plot.freqAnal.Rd b/man/plot.freqAnal.Rd index 8a10349..c2a7c4e 100644 --- a/man/plot.freqAnal.Rd +++ b/man/plot.freqAnal.Rd @@ -36,8 +36,8 @@ corresponding probability scale (uniform for "emp"). If \code{which} is \section{Side Effect}{ The object \code{x} is plotted } + \seealso{ \code{\link{freqAnal}} } \keyword{hplot} - diff --git a/man/plot.recess.Rd b/man/plot.recess.Rd index 26068e8..abddb85 100644 --- a/man/plot.recess.Rd +++ b/man/plot.recess.Rd @@ -41,4 +41,3 @@ then \code{before} is forced to a value greater than 0. \code{\link{rise}} } \keyword{hplot} - diff --git a/man/plot.rise.Rd b/man/plot.rise.Rd index 2483b0e..35759ce 100644 --- a/man/plot.rise.Rd +++ b/man/plot.rise.Rd @@ -31,4 +31,3 @@ Plot an object of class "rise" from a groundwater rise analysis. \code{\link{rise}} } \keyword{hplot} - diff --git a/man/plot.rora.Rd b/man/plot.rora.Rd index 9fef073..165dfcb 100644 --- a/man/plot.rora.Rd +++ b/man/plot.rora.Rd @@ -33,4 +33,3 @@ displacement analysis. \code{\link{rora}} } \keyword{hplot} - diff --git a/man/predict.freqAnal.Rd b/man/predict.freqAnal.Rd index 1734ea4..864f38c 100644 --- a/man/predict.freqAnal.Rd +++ b/man/predict.freqAnal.Rd @@ -22,4 +22,3 @@ The object \code{x} is returned invisibly. \description{ Compute values for selected probability values. } - diff --git a/man/print.baseflow.Rd b/man/print.baseflow.Rd index 72b5068..a7274f0 100644 --- a/man/print.baseflow.Rd +++ b/man/print.baseflow.Rd @@ -22,8 +22,8 @@ Print an object of class "baseflow" from any baseflow analysis. \section{Side Effect}{ The object \code{x} is printed } + \seealso{ \code{\link{part}}, \code{\link{hysep}}, \code{\link{bfi}} } \keyword{print} - diff --git a/man/print.fall.Rd b/man/print.fall.Rd index d41b5f2..641e5f5 100644 --- a/man/print.fall.Rd +++ b/man/print.fall.Rd @@ -24,4 +24,3 @@ Print an object of class "fall" from a groundwater recession analysis. \code{\link{fall}} } \keyword{print} - diff --git a/man/print.freqAnal.Rd b/man/print.freqAnal.Rd index b416027..b917ac8 100644 --- a/man/print.freqAnal.Rd +++ b/man/print.freqAnal.Rd @@ -21,4 +21,3 @@ The object \code{x} is returned invisibly. \description{ Prints the results of a frequency analysis. } - diff --git a/man/print.recess.Rd b/man/print.recess.Rd index 8f45e84..4ba36d8 100644 --- a/man/print.recess.Rd +++ b/man/print.recess.Rd @@ -22,8 +22,8 @@ Print surface-water recession summary information \section{Side Effect}{ The object \code{x} is printed } + \seealso{ \code{\link{recess}} } \keyword{print} - diff --git a/man/print.rise.Rd b/man/print.rise.Rd index 5dad649..0793d61 100644 --- a/man/print.rise.Rd +++ b/man/print.rise.Rd @@ -20,8 +20,8 @@ Print an object of class "rise" from a groundwater rise analysis. \section{Side Effect}{ The object \code{x} is printed } + \seealso{ \code{\link{rise}} } \keyword{print} - diff --git a/man/print.rora.Rd b/man/print.rora.Rd index 544610f..45e39c3 100644 --- a/man/print.rora.Rd +++ b/man/print.rora.Rd @@ -21,8 +21,8 @@ displacement analysis. \section{Side Effect}{ The object \code{x} is printed } + \seealso{ \code{\link{rora}} } \keyword{print} - diff --git a/man/recess.Rd b/man/recess.Rd index 852fb92..726d8b5 100644 --- a/man/recess.Rd +++ b/man/recess.Rd @@ -58,4 +58,3 @@ with(ChoptankFlow, recess(Flow, datetime, STAID="0191000")) } } \keyword{recession} - diff --git a/man/rise.Rd b/man/rise.Rd index 7869998..127fb5f 100644 --- a/man/rise.Rd +++ b/man/rise.Rd @@ -49,4 +49,3 @@ Rutledge, A.T., 2002, User guide for the PULSE program: U.S. Geological Survey Open-File Report 02--455, 34 p. } \keyword{recession} - diff --git a/man/rora.Rd b/man/rora.Rd index 75c0b39..d11e4cf 100644 --- a/man/rora.Rd +++ b/man/rora.Rd @@ -72,4 +72,3 @@ STAID, the station identifier. \description{ Estiamte recharge by the method of hydrograph recession displacement. } - diff --git a/man/seasonYear.Rd b/man/seasonYear.Rd index 03eee96..98021a4 100644 --- a/man/seasonYear.Rd +++ b/man/seasonYear.Rd @@ -3,6 +3,7 @@ \name{seasonYear} \alias{seasonYear} \alias{seasonYearMD} +\alias{seasonYearMD} \title{Season of Year} \usage{ seasonYear(x, start.month = "June", end.month = "September", @@ -68,4 +69,3 @@ seasonYearMD(QW05078470$DATES) \code{\link{month.name}}, \code{\link{month.abb}} } \keyword{manip} - diff --git a/man/setSeasons.Rd b/man/setSeasons.Rd index 3589e64..bda3cad 100644 --- a/man/setSeasons.Rd +++ b/man/setSeasons.Rd @@ -41,4 +41,3 @@ Summer=c("Jun", "Sep"), Fall=c("Oct", "Nov")) \code{\link{seasonYear}}, \code{\link{month.abb}} } \keyword{manip} - diff --git a/man/subset.fall.Rd b/man/subset.fall.Rd index 5ce5889..afac23a 100644 --- a/man/subset.fall.Rd +++ b/man/subset.fall.Rd @@ -44,4 +44,3 @@ with(GlacialRidge, fall(G12, datetime, MPelev=1126.42))[1] \code{\link{fall}} } \keyword{manip} - diff --git a/man/wtf.Rd b/man/wtf.Rd index 84b509f..33a207f 100644 --- a/man/wtf.Rd +++ b/man/wtf.Rd @@ -57,4 +57,3 @@ Healy, R.W., and Cook, P.G., 2002, Using ground-water levels to estimate recharge. Hydrogeology Journal, v. 10, p. 91--109. } \keyword{recession} -