diff --git a/DESCRIPTION b/DESCRIPTION index d02adb0a7f84b8a9822724e1c9fdf6800d81b26d..30925fcbb8a41824dbd0c09758037f9d16116c8c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: dataRetrieval Type: Package Title: Retrieval functions for hydrologic data -Version: 1.3.2 +Version: 1.3.3 Date: 2014-08-04 Author: Robert M. Hirsch, Laura De Cicco Maintainer: Laura De Cicco <ldecicco@usgs.gov> diff --git a/NEWS b/NEWS index 0c14291543e686b98068355715149c5b7b2c0a74..8308939a2fd7af4ca7829136379e7cb5fe5f4780 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ dataRetrieval 1.3.2 * Deprecated getQWData, updated getWQPData to take either parameter code or characteristic name. * Changed the name of raw data retrievals to: retrieveNWISqwData, retrieveNWISunitData, retrieveNWISdvData, and retrieveWQPqwData (from: retrieveNWISqwData, retrieveUnitNWISData, retrieveNWISData, getRawQWData) * Added NA warning to getDVData function +* Updated mergeReport to allow for Sample data with different measurements taken on the same day dataRetrieval 1.2.2 diff --git a/R/getGeneralWQPData.R b/R/getGeneralWQPData.R index 9c178aa5053265c115d6813905b53684a25ee198..f163f623a7bdd04b8d148b918c04013b14f662de 100644 --- a/R/getGeneralWQPData.R +++ b/R/getGeneralWQPData.R @@ -9,9 +9,8 @@ #' (subsequent qualifier/value columns could follow depending on requested parameter codes) #' @export #' @examples -#' setInternet2(use=NA) -#' options(timeout=120) -#' pHData <- getGeneralWQPData(siteid="USGS-04024315",characteristicName="pH") +#' nameToUse <- "pH" +#' pHData <- getGeneralWQPData(siteid="USGS-04024315",characteristicName=nameToUse) getGeneralWQPData <- function(...){ matchReturn <- match.call() @@ -22,7 +21,7 @@ getGeneralWQPData <- function(...){ if(!all(names(matchReturn[-1]) %in% options)) warning(matchReturn[!(names(matchReturn[-1]) %in% options)],"is not a valid query parameter to the Water Quality Portal") - values <- sapply(matchReturn[-1], function(x) URLencode(as.character(paste(x,collapse="",sep="")))) + values <- sapply(matchReturn[-1], function(x) URLencode(as.character(paste(eval(x),collapse="",sep="")))) urlCall <- paste(paste(names(values),values,sep="="),collapse="&") diff --git a/R/getNWISSites.R b/R/getNWISSites.R index 78172d2c8e72bb81f7efe3da58cc0f3405b5bd54..1b720c3806bff87ab94c41b16830d5f6d2138f92 100644 --- a/R/getNWISSites.R +++ b/R/getNWISSites.R @@ -13,7 +13,7 @@ getNWISSites <- function(...){ matchReturn <- match.call() - values <- sapply(matchReturn[-1], function(x) URLencode(as.character(paste(x,collapse="",sep="")))) + values <- sapply(matchReturn[-1], function(x) URLencode(as.character(paste(eval(x),collapse="",sep="")))) urlCall <- paste(paste(names(values),values,sep="="),collapse="&") diff --git a/R/getWQPSites.R b/R/getWQPSites.R index 73c9e7d75a79796a1593f5511441b1ff9d0b32dc..2cf54c6d36cdf403759ba12d655086152d7d4d09 100644 --- a/R/getWQPSites.R +++ b/R/getWQPSites.R @@ -9,13 +9,10 @@ #' (subsequent qualifier/value columns could follow depending on requested parameter codes) #' @export #' @examples -#' setInternet2(use=NA) -#' options(timeout=120) -#' \dontrun{sitesList <- getWQPSites(within=10,lat=43.06932,long=-89.4444,characteristicName="pH") -#' siteListPH <- getWQPSites(characteristicName="pH")} +#' siteListPH <- getWQPSites(characteristicName="pH", statecode="US:55") getWQPSites <- function(...){ - matchReturn <- match.call() + matchReturn <- match.call(expand.dots = TRUE) options <- c("bBox","lat","long","within","countrycode","statecode","countycode","siteType","organization", "siteid","huc","sampleMedia","characteristicType","characteristicName","pCode","activityId", @@ -23,7 +20,7 @@ getWQPSites <- function(...){ if(!all(names(matchReturn[-1]) %in% options)) warning(matchReturn[!(names(matchReturn[-1]) %in% options)],"is not a valid query parameter to the Water Quality Portal") - values <- sapply(matchReturn[-1], function(x) URLencode(as.character(paste(x,collapse="",sep="")))) + values <- sapply(matchReturn[-1], function(x) URLencode(as.character(paste(eval(x),collapse="",sep="")))) urlCall <- paste(paste(names(values),values,sep="="),collapse="&") diff --git a/R/mergeReport.r b/R/mergeReport.r index 0cf0af3e159ba82b2684eff3c5171bce6d4faa40..aafdcf210fd853ed451136649d719df2685158a9 100644 --- a/R/mergeReport.r +++ b/R/mergeReport.r @@ -18,12 +18,8 @@ mergeReport<-function(localDaily = Daily, localSample = Sample, interactive=TRUE if (interactive){ dataOverview(localDaily, localSample) } - julFirst<-localDaily$Julian[1] - sampleDate<-as.Date(localSample$Date) - sampleJulian<-as.numeric(julian(sampleDate,origin=as.Date("1850-01-01"))) - sampleIndex <- sampleJulian-julFirst+1 - Q <- localDaily$Q[sampleIndex] - LogQ<-log(Q) - newSample<-data.frame(localSample,Q,LogQ) + + newSample <- merge(Daily[,c("Date","Q","LogQ")],Sample,by = "Date",all.y = TRUE) + return(newSample) } diff --git a/R/populateDateColumns.r b/R/populateDateColumns.r index 99ac1d3ce67ba1dea9e875a01f4c6c2166a8526a..b6a5cc7d2bb97949c06836d0183b7507e5fb6682 100644 --- a/R/populateDateColumns.r +++ b/R/populateDateColumns.r @@ -6,7 +6,7 @@ #' @return DateFrame dataframe #' @export #' @examples -#' dateTime <- c('1984-01-01', '1985-01-02', '1986-01-03') +#' dateTime <- c('1984-02-28 13:56', '1984-03-01', '1986-03-01') #' expandedDateDF <- populateDateColumns(dateTime) populateDateColumns <- function(rawData){ # rawData is a vector of dates DateFrame <- as.data.frame(matrix(ncol=1,nrow=length(rawData))) @@ -17,12 +17,25 @@ populateDateColumns <- function(rawData){ # rawData is a vector of dates DateFrame$Month <- dateTime$mon + 1 DateFrame$Day <- dateTime$yday + 1 year <- dateTime$year + 1900 + hour <- dateTime$hour + minute <- dateTime$min + + if (sum(hour) == 0 & sum(minute) == 0){ + dateTime$hour <- rep(12,length(dateTime)) + } leapOffset <- ifelse((year%%4 == 0) & ((year%%100 != 0) | (year%%400 == 0)), 0,1) DateFrame$Day[DateFrame$Day > 59] <- DateFrame$Day[DateFrame$Day > 59] + leapOffset[DateFrame$Day > 59] - DateFrame$DecYear <- year + (DateFrame$Day -0.5)/366 +# DateFrame$DecYear <- year + (DateFrame$Day -0.5)/366 + + jan1 <- as.POSIXlt(paste(year,"-01-01",sep=""),format="%Y-%m-%d") + jan1NextYear <- as.POSIXlt(paste(year+1,"-01-01",sep=""),format="%Y-%m-%d") + decimal <- as.numeric(difftime(dateTime, jan1, units = "secs")) + decimal <- decimal/as.numeric(difftime(jan1NextYear, jan1, units = "secs")) + + DateFrame$DecYear <- year + decimal DateFrame$MonthSeq <- ((year-1850)*12)+DateFrame$Month return (DateFrame) diff --git a/inst/doc/dataRetrieval.pdf b/inst/doc/dataRetrieval.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f62020ecfa6e09995d9db1351c3b6d48346e33b7 Binary files /dev/null and b/inst/doc/dataRetrieval.pdf differ diff --git a/man/getGeneralWQPData.Rd b/man/getGeneralWQPData.Rd index 6c9f32562544856b47b22eda04b99bef5e473cfd..f191f404ab752483e3ce5d370dbe97700d63f174 100644 --- a/man/getGeneralWQPData.Rd +++ b/man/getGeneralWQPData.Rd @@ -17,9 +17,8 @@ Imports data from Water Quality Portal web service. This function gets the data because it allows for other agencies rather than the USGS. } \examples{ -setInternet2(use=NA) -options(timeout=120) -pHData <- getGeneralWQPData(siteid="USGS-04024315",characteristicName="pH") +nameToUse <- "pH" +pHData <- getGeneralWQPData(siteid="USGS-04024315",characteristicName=nameToUse) } \keyword{WQP} \keyword{data} diff --git a/man/getWQPSites.Rd b/man/getWQPSites.Rd index 357c1f731bac22c2f15e9fe32909edef2c6430fb..4462ad23a1cb9021515e4427a58dcf5b297e8cdb 100644 --- a/man/getWQPSites.Rd +++ b/man/getWQPSites.Rd @@ -17,10 +17,7 @@ Returns a list of sites from the Water Quality Portal web service. This function Arguments to the function should be based on \url{www.waterqualitydata.us/webservices_documentation.jsp} } \examples{ -setInternet2(use=NA) -options(timeout=120) -\dontrun{sitesList <- getWQPSites(within=10,lat=43.06932,long=-89.4444,characteristicName="pH") -siteListPH <- getWQPSites(characteristicName="pH")} +siteListPH <- getWQPSites(characteristicName="pH", statecode="US:55") } \keyword{WQP} \keyword{data} diff --git a/man/populateDateColumns.Rd b/man/populateDateColumns.Rd index 8d8f3a447b686c670d31f6f938aaf03d9301dce7..9b5a10f8b0a9865476c2c7b8c342f36ab897a57d 100644 --- a/man/populateDateColumns.Rd +++ b/man/populateDateColumns.Rd @@ -15,7 +15,7 @@ DateFrame dataframe Creates various date columns for WRTDS study. } \examples{ -dateTime <- c('1984-01-01', '1985-01-02', '1986-01-03') +dateTime <- c('1984-02-28 13:56', '1984-03-01', '1986-03-01') expandedDateDF <- populateDateColumns(dateTime) } diff --git a/vignettes/dataRetrieval-concordance.tex b/vignettes/dataRetrieval-concordance.tex index 4c9c14712f612496a3609dbe58d84413073e4f60..9ddb6dd290d811cff4b497da7a25abced8ca6965 100644 --- a/vignettes/dataRetrieval-concordance.tex +++ b/vignettes/dataRetrieval-concordance.tex @@ -5,5 +5,5 @@ 0 6 1 17 0 27 1 6 0 11 1 9 0 15 1 13 0 21 1 4 0 21 1 % 4 0 17 1 7 0 22 1 8 0 19 1 4 0 9 1 4 0 78 1 1 2 9 1 1 % 4 4 1 20 0 44 1 4 0 32 1 4 0 21 1 4 0 21 1 37 0 13 1 % -9 0 94 1 4 0 9 1 12 0 13 1 4 0 14 1 4 0 5 1 4 0 23 1 % +9 0 94 1 4 0 9 1 13 0 13 1 4 0 14 1 4 0 5 1 4 0 23 1 % 18 0 8 1 4 0 55 1} diff --git a/vignettes/dataRetrieval.log b/vignettes/dataRetrieval.log index f053973c87381856b42db677c3a5d80e70ba3e23..105be2591df3c3c3f049d5333ab8169dc829f64f 100644 --- a/vignettes/dataRetrieval.log +++ b/vignettes/dataRetrieval.log @@ -1,7 +1,7 @@ -This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9) (preloaded format=pdflatex 2014.8.2) 3 AUG 2014 14:57 +This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9) (preloaded format=pdflatex 2014.8.7) 13 AUG 2014 13:08 entering extended mode **dataRetrieval.tex -(C:\RCodes\dataRetrieval\vignettes\dataRetrieval.tex +(D:\LADData\RCode\dataRetrieval\vignettes\dataRetrieval.tex LaTeX2e <2011/06/27> Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic, @@ -70,7 +70,7 @@ File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive ) Package color Info: Driver file: pdftex.def on input line 130. ) -(C:\Users\Laura\AppData\Roaming\MiKTeX\2.9\tex\latex\framed\framed.sty +(C:\Users\ldecicco\AppData\Roaming\MiKTeX\2.9\tex\latex\framed\framed.sty Package: framed 2011/10/22 v 0.96: framed or shaded text with page breaks \OuterFrameSep=\skip43 \fb@frw=\dimen105 @@ -220,7 +220,7 @@ Package hyperref Info: Implicit mode ON; LaTeX internals redefined. Package hyperref Info: Bookmarks ON on input line 4688. \c@Hy@tempcnt=\count103 -(C:\Users\Laura\AppData\Roaming\MiKTeX\2.9\tex\latex\url\url.sty +(C:\Users\ldecicco\AppData\Roaming\MiKTeX\2.9\tex\latex\url\url.sty \Urlmuskip=\muskip11 Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. ) @@ -257,7 +257,7 @@ Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 ) \Hy@SectionHShift=\skip47 ) -(C:\Users\Laura\AppData\Roaming\MiKTeX\2.9\tex\latex\natbib\natbib.sty +(C:\Users\ldecicco\AppData\Roaming\MiKTeX\2.9\tex\latex\natbib\natbib.sty Package: natbib 2010/09/13 8.31b (PWD, AO) \bibhang=\skip48 \bibsep=\skip49 @@ -285,7 +285,7 @@ File: babel.def 2008/07/08 v3.8m Babel common definitions \l@australian = a dialect from \language\l@british \l@newzealand = a dialect from \language\l@british )) -(C:\Users\Laura\AppData\Roaming\MiKTeX\2.9\tex\latex\preprint\authblk.sty +(C:\Users\ldecicco\AppData\Roaming\MiKTeX\2.9\tex\latex\preprint\authblk.sty Package: authblk 2001/02/27 1.3 (PWD) \affilsep=\skip50 \@affilsep=\skip51 @@ -293,13 +293,13 @@ Package: authblk 2001/02/27 1.3 (PWD) \c@authors=\count113 \c@affil=\count114 ) -(C:\Users\Laura\AppData\Roaming\MiKTeX\2.9\tex\latex\subfig\subfig.sty +(C:\Users\ldecicco\AppData\Roaming\MiKTeX\2.9\tex\latex\subfig\subfig.sty Package: subfig 2005/06/28 ver: 1.3 subfig package -(C:\Users\Laura\AppData\Roaming\MiKTeX\2.9\tex\latex\caption\caption.sty +(C:\Users\ldecicco\AppData\Roaming\MiKTeX\2.9\tex\latex\caption\caption.sty Package: caption 2013/05/02 v3.3-89 Customizing captions (AR) -(C:\Users\Laura\AppData\Roaming\MiKTeX\2.9\tex\latex\caption\caption3.sty +(C:\Users\ldecicco\AppData\Roaming\MiKTeX\2.9\tex\latex\caption\caption3.sty Package: caption3 2013/05/02 v1.6-88 caption3 kernel (AR) Package caption3 Info: TeX engine: e-TeX on input line 57. \captionmargin=\dimen123 @@ -326,16 +326,13 @@ Package caption Info: hyperref package is loaded. \c@lotdepth=\count122 \sf@top=\skip55 \sf@bottom=\skip56 -) -(C:\Users\Laura\AppData\Roaming\MiKTeX\2.9\tex\latex\placeins\placeins.sty +) (C:\Users\ldecicco\AppData\Roaming\MiKTeX\2.9\tex\latex\placeins\placeins.sty Package: placeins 2005/04/18 v 2.2 -) -(C:\Users\Laura\AppData\Roaming\MiKTeX\2.9\tex\latex\mdwtools\footnote.sty +) (C:\Users\ldecicco\AppData\Roaming\MiKTeX\2.9\tex\latex\mdwtools\footnote.sty Package: footnote 1997/01/28 1.13 Save footnotes around boxes \fn@notes=\box28 \fn@width=\dimen131 -) -("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\tools\tabularx.sty" +) ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\tools\tabularx.sty" Package: tabularx 1999/01/07 v2.07 `tabularx' package (DPC) ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\tools\array.sty" @@ -354,17 +351,16 @@ Package: array 2008/09/09 v2.4c Tabular extension package (FMi) \TX@cols=\count123 \TX@ftn=\toks21 ) -(C:\Users\Laura\AppData\Roaming\MiKTeX\2.9\tex\latex\threeparttable\threepartta -ble.sty +(C:\Users\ldecicco\AppData\Roaming\MiKTeX\2.9\tex\latex\threeparttable\threepar +ttable.sty Package: threeparttable 2003/06/13 v 3.0 \@tempboxb=\box29 ) ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ltxmisc\parskip.sty" Package: parskip 2001/04/09 non-zero parskip adjustments -) -(C:\Users\Laura\AppData\Roaming\MiKTeX\2.9\tex\latex\csquotes\csquotes.sty +) (C:\Users\ldecicco\AppData\Roaming\MiKTeX\2.9\tex\latex\csquotes\csquotes.sty Package: csquotes 2011/10/22 v5.1d context-sensitive quotations -(C:\Users\Laura\AppData\Roaming\MiKTeX\2.9\tex\latex\etoolbox\etoolbox.sty +(C:\Users\ldecicco\AppData\Roaming\MiKTeX\2.9\tex\latex\etoolbox\etoolbox.sty Package: etoolbox 2011/01/03 v2.1 e-TeX tools for LaTeX ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\misc\etex.sty" @@ -381,19 +377,18 @@ Package: etex 1998/03/26 v2.0 eTeX basic definition package (PEB) \csq@tshold=\count131 \csq@ltx@everypar=\toks22 -(C:\Users\Laura\AppData\Roaming\MiKTeX\2.9\tex\latex\csquotes\csquotes.def +(C:\Users\ldecicco\AppData\Roaming\MiKTeX\2.9\tex\latex\csquotes\csquotes.def File: csquotes.def 2011/10/22 v5.1d csquotes generic definitions ) Package csquotes Info: Trying to load configuration file 'csquotes.cfg'... Package csquotes Info: ... configuration file loaded successfully. -(C:\Users\Laura\AppData\Roaming\MiKTeX\2.9\tex\latex\csquotes\csquotes.cfg +(C:\Users\ldecicco\AppData\Roaming\MiKTeX\2.9\tex\latex\csquotes\csquotes.cfg File: csquotes.cfg -)) -(C:\Users\Laura\AppData\Roaming\MiKTeX\2.9\tex\latex\setspace\setspace.sty +)) (C:\Users\ldecicco\AppData\Roaming\MiKTeX\2.9\tex\latex\setspace\setspace.st +y Package: setspace 2011/12/19 v6.7a set line spacing -) -("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\psnfss\mathptmx.sty" +) ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\psnfss\mathptmx.sty" Package: mathptmx 2005/04/12 PSNFSS-v9.2a Times w/ Math, improved (SPQR, WaS) LaTeX Font Info: Redeclaring symbol font `operators' on input line 28. LaTeX Font Info: Overwriting symbol font `operators' in version `normal' @@ -438,7 +433,7 @@ Package: indentfirst 1995/11/23 v1.03 Indent first paragraph (DPC) ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\psnfss\courier.sty" Package: courier 2005/04/12 PSNFSS-v9.2a (WaS) ) -(C:\Users\Laura\AppData\Roaming\MiKTeX\2.9\tex\latex\titlesec\titlesec.sty +(C:\Users\ldecicco\AppData\Roaming\MiKTeX\2.9\tex\latex\titlesec\titlesec.sty Package: titlesec 2011/12/15 v2.10.0 Sectioning titles \ttl@box=\box30 \beforetitleunit=\skip59 @@ -450,11 +445,11 @@ Package: titlesec 2011/12/15 v2.10.0 Sectioning titles \titlewidthlast=\dimen142 \titlewidthfirst=\dimen143 ) -(C:\Users\Laura\AppData\Roaming\MiKTeX\2.9\tex\latex\titlesec\titletoc.sty +(C:\Users\ldecicco\AppData\Roaming\MiKTeX\2.9\tex\latex\titlesec\titletoc.sty Package: titletoc 2011/12/15 v1.6 TOC entries \ttl@leftsep=\dimen144 ) -(C:\Users\Laura\AppData\Roaming\MiKTeX\2.9\tex\latex\upquote\upquote.sty +(C:\Users\ldecicco\AppData\Roaming\MiKTeX\2.9\tex\latex\upquote\upquote.sty Package: upquote 2012/04/19 v1.3 upright-quote and grave-accent glyphs in verba tim @@ -544,7 +539,7 @@ Package csquotes Info: ... found 'babel' package. Package csquotes Info: Adjusting default style. Package csquotes Info: Redefining alias 'default' -> 'american'. -(C:\RCodes\dataRetrieval\vignettes\dataRetrieval.aux) +(D:\LADData\RCode\dataRetrieval\vignettes\dataRetrieval.aux) LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 174. LaTeX Font Info: ... okay on input line 174. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 174. @@ -573,7 +568,7 @@ LaTeX Font Info: Try loading font information for OT1+ptm on input line 174. ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\psnfss\ot1ptm.fd" File: ot1ptm.fd 2001/06/04 font definitions for OT1/ptm. ) -(C:\Users\Laura\AppData\Roaming\MiKTeX\2.9\tex\context\base\supp-pdf.mkii +(C:\Users\ldecicco\AppData\Roaming\MiKTeX\2.9\tex\context\base\supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] \scratchcounter=\count132 \scratchdimen=\dimen145 @@ -601,8 +596,8 @@ LaTeX Info: Redefining \ref on input line 174. LaTeX Info: Redefining \pageref on input line 174. LaTeX Info: Redefining \nameref on input line 174. -(C:\RCodes\dataRetrieval\vignettes\dataRetrieval.out) -(C:\RCodes\dataRetrieval\vignettes\dataRetrieval.out) +(D:\LADData\RCode\dataRetrieval\vignettes\dataRetrieval.out) +(D:\LADData\RCode\dataRetrieval\vignettes\dataRetrieval.out) \@outlinefile=\write3 Package caption Info: Begin \AtBeginDocument code. Package caption Info: subfig package v1.3 is loaded. @@ -631,19 +626,19 @@ LaTeX Font Info: Font shape `OT1/phv/bx/n' in size <17.28> not available LaTeX Font Info: Font shape `OT1/phv/b/n' will be (Font) scaled to size 15.55188pt on input line 204. -(C:\RCodes\dataRetrieval\vignettes\dataRetrieval.toc +(D:\LADData\RCode\dataRetrieval\vignettes\dataRetrieval.toc Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [1 -{C:/Users/Laura/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]) +{C:/Users/ldecicco/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]) \tf@toc=\write4 -(C:\RCodes\dataRetrieval\vignettes\dataRetrieval.lof) +(D:\LADData\RCode\dataRetrieval\vignettes\dataRetrieval.lof) \tf@lof=\write5 -(C:\RCodes\dataRetrieval\vignettes\dataRetrieval.lot +(D:\LADData\RCode\dataRetrieval\vignettes\dataRetrieval.lot Overfull \hbox (1.53842pt too wide) in paragraph at lines 4--4 []|\OT1/phv/b/n/10.95 Table| | [][]\OT1/phv/m/n/10.95 Daily mean data avail-ab ile at the Chop-tank River near Greens-boro, MD. [Some columns @@ -790,7 +785,8 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[11 <C:/RCodes/dataRetrieval/vignettes/figure/getNWIStemperaturePlot.pdf>] +[11 <D:/LADData/RCode/dataRetrieval/vignettes/figure/getNWIStemperaturePlot.pdf +>] Package color Info: Redefining color shadecolor on input line 600. Package color Info: Redefining color shadecolor on input line 614. @@ -820,11 +816,10 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[14 <C:/RCodes/dataRetrieval/vignettes/figure/getQWtemperaturePlot.pdf>] +[14 <D:/LADData/RCode/dataRetrieval/vignettes/figure/getQWtemperaturePlot.pdf>] Package color Info: Redefining color shadecolor on input line 697. LaTeX Font Info: Try loading font information for TS1+pcr on input line 699. - ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\psnfss\ts1pcr.fd" File: ts1pcr.fd 2001/06/04 font definitions for TS1/pcr. ) @@ -937,7 +932,7 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[26 <C:/RCodes/dataRetrieval/vignettes/figure/egretEx.pdf>] +[26 <D:/LADData/RCode/dataRetrieval/vignettes/figure/egretEx.pdf>] Overfull \vbox (21.68121pt too high) has occurred while \output is active [] @@ -950,18 +945,12 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [28] Package color Info: Redefining color shadecolor on input line 1248. Package color Info: Redefining color shadecolor on input line 1261. - -Overfull \hbox (51.24562pt too wide) in paragraph at lines 1272--1272 -[] \OT1/pcr/m/n/10.95 Sample1 <- localSample[!duplicated(localSample[c("DecYea -r","ConcHigh")]),][] - [] - -<Rhelp.png, id=399, 433.62pt x 395.22656pt> + <Rhelp.png, id=399, 433.62pt x 395.22656pt> File: Rhelp.png Graphic file (type png) <use Rhelp.png> -Package pdftex.def Info: Rhelp.png used on input line 1279. +Package pdftex.def Info: Rhelp.png used on input line 1280. (pdftex.def) Requested size: 433.61894pt x 395.22559pt. -Package color Info: Redefining color shadecolor on input line 1286. +Package color Info: Redefining color shadecolor on input line 1287. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] @@ -972,10 +961,10 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[30 <C:/RCodes/dataRetrieval/vignettes/Rhelp.png>] -Package color Info: Redefining color shadecolor on input line 1301. -Package color Info: Redefining color shadecolor on input line 1313. -Package color Info: Redefining color shadecolor on input line 1328. +[30 <D:/LADData/RCode/dataRetrieval/vignettes/Rhelp.png>] +Package color Info: Redefining color shadecolor on input line 1302. +Package color Info: Redefining color shadecolor on input line 1314. +Package color Info: Redefining color shadecolor on input line 1329. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] @@ -983,9 +972,9 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [31 ] -Package color Info: Redefining color shadecolor on input line 1365. +Package color Info: Redefining color shadecolor on input line 1366. -Overfull \hbox (11.82567pt too wide) in paragraph at lines 1382--1382 +Overfull \hbox (11.82567pt too wide) in paragraph at lines 1383--1383 []\OT1/pcr/m/n/10.95 Suspended sediment concentration (SSC) 1980-10-01 1991-09- 30 3651 mg/l[] [] @@ -997,27 +986,27 @@ Overfull \vbox (21.68121pt too high) has occurred while \output is active [] [32] <table1.png, id=423, 554.07pt x 125.71968pt> File: table1.png Graphic file (type png) <use table1.png> -Package pdftex.def Info: table1.png used on input line 1401. +Package pdftex.def Info: table1.png used on input line 1402. (pdftex.def) Requested size: 554.06865pt x 125.71936pt. Overfull \vbox (21.68121pt too high) has occurred while \output is active [] -[33 <C:/RCodes/dataRetrieval/vignettes/table1.png>] -Package atveryend Info: Empty hook `BeforeClearDocument' on input line 1426. -Package atveryend Info: Empty hook `AfterLastShipout' on input line 1426. +[33 <D:/LADData/RCode/dataRetrieval/vignettes/table1.png>] +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 1427. +Package atveryend Info: Empty hook `AfterLastShipout' on input line 1427. -(C:\RCodes\dataRetrieval\vignettes\dataRetrieval.aux) -Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 1426. -Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 1426. +(D:\LADData\RCode\dataRetrieval\vignettes\dataRetrieval.aux) +Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 1427. +Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 1427. Package rerunfilecheck Info: File `dataRetrieval.out' has not changed. (rerunfilecheck) Checksum: 0A42302DA34F8DDBBBAD8A2EC505FAF3;1805. -Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 1426. +Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 1427. ) Here is how much of TeX's memory you used: 9909 strings out of 493921 - 147929 string characters out of 3144877 + 148207 string characters out of 3144868 248517 words of memory out of 3000000 12916 multiletter control sequences out of 15000+200000 45680 words of font info for 91 fonts, out of 3000000 for 9000 @@ -1033,7 +1022,7 @@ les (x86)/MiKTeX 2.9/fonts/type1/urw/courier/ucrb8a.pfb><C:/Program Files (x86) rw/helvetic/uhvr8a.pfb><C:/Program Files (x86)/MiKTeX 2.9/fonts/type1/urw/times /utmr8a.pfb><C:/Program Files (x86)/MiKTeX 2.9/fonts/type1/urw/times/utmri8a.pf b> -Output written on dataRetrieval.pdf (33 pages, 335842 bytes). +Output written on dataRetrieval.pdf (33 pages, 335831 bytes). PDF statistics: 484 PDF objects out of 1000 (max. 8388607) 84 named destinations out of 1000 (max. 500000) diff --git a/vignettes/dataRetrieval.pdf b/vignettes/dataRetrieval.pdf index ac5e5885a40977f288bbb088b839b505230a37f2..ab32ac0ac6810c3430e3bd671e6b9ad7b6106028 100644 Binary files a/vignettes/dataRetrieval.pdf and b/vignettes/dataRetrieval.pdf differ diff --git a/vignettes/dataRetrieval.synctex.gz b/vignettes/dataRetrieval.synctex.gz index 1a63eebca98d346fba1a493bf868925e16f68c7f..f2742fffb97ddfdbbbc4a0d8fbf026ef220bb2ae 100644 Binary files a/vignettes/dataRetrieval.synctex.gz and b/vignettes/dataRetrieval.synctex.gz differ diff --git a/vignettes/dataRetrieval.tex b/vignettes/dataRetrieval.tex index ce9715cc12d0c519d1431dd0ef3b1c7954e5ac68..d4710d610fcb823dc5445e34f6257333b9d53bd8 100644 --- a/vignettes/dataRetrieval.tex +++ b/vignettes/dataRetrieval.tex @@ -267,7 +267,7 @@ Not every station will measure all parameters. A short list of commonly measured % latex table generated in R 3.1.1 by xtable 1.7-3 package -% Sun Aug 03 14:57:17 2014 +% Wed Aug 13 13:07:49 2014 \begin{table}[ht] \caption{Common USGS Parameter Codes} \label{tab:params} @@ -330,7 +330,7 @@ For unit values data (sensor data measured at regular time intervals such as 15 Some common codes are shown in Table \ref{tab:stat}. % latex table generated in R 3.1.1 by xtable 1.7-3 package -% Sun Aug 03 14:57:19 2014 +% Wed Aug 13 13:07:50 2014 \begin{table}[ht] \caption{Commonly used USGS Stat Codes} \label{tab:stat} @@ -411,7 +411,7 @@ To discover what data is available for a particular USGS site, including measure % latex table generated in R 3.1.1 by xtable 1.7-3 package -% Sun Aug 03 14:57:20 2014 +% Wed Aug 13 13:07:50 2014 \begin{table}[ht] \caption{Daily mean data availabile at the Choptank River near Greensboro, MD. [Some columns deleted for space considerations]} \label{tab:gda} @@ -423,7 +423,7 @@ To discover what data is available for a particular USGS site, including measure & Temperature, water & 1988-10-01 & 2012-05-09 & 894 & deg C \\ [5pt] & Temperature, water & 2010-10-01 & 2012-05-09 & 529 & deg C \\ [5pt] & Temperature, water & 2010-10-01 & 2012-05-09 & 529 & deg C \\ - [5pt] & Stream flow, mean. daily & 1948-01-01 & 2014-08-02 & 24321 & ft$^3$/s \\ + [5pt] & Stream flow, mean. daily & 1948-01-01 & 2014-08-12 & 24331 & ft$^3$/s \\ [5pt] & Specific conductance & 2010-10-01 & 2012-05-09 & 527 & uS/cm @25C \\ [5pt] & Specific conductance & 2010-10-01 & 2012-05-09 & 527 & uS/cm @25C \\ [5pt] & Specific conductance & 2010-10-01 & 2012-05-09 & 527 & uS/cm @25C \\ @@ -789,7 +789,7 @@ There are 4750 data points, and 4750 days. % latex table generated in R 3.1.1 by xtable 1.7-3 package -% Sun Aug 03 14:57:39 2014 +% Wed Aug 13 13:08:05 2014 \begin{table}[ht] \caption{Daily dataframe} \label{tab:DailyDF1} @@ -910,7 +910,7 @@ To illustrate how the dataRetrieval package handles a more complex censoring pro % latex table generated in R 3.1.1 by xtable 1.7-3 package -% Sun Aug 03 14:57:40 2014 +% Wed Aug 13 13:08:06 2014 \begin{table}[ht] \caption{Example data} \label{tab:exampleComplexQW} @@ -955,12 +955,12 @@ For the more complex example case, let us say dp is reported as \verb@<@0.01 and 5 2005-05-30 NA 0.050 0 0.0250 56762 5 6 2005-10-30 NA 0.020 0 0.0100 56915 10 Day DecYear MonthSeq SinDY CosDY -1 46 2003 1838 0.70407 0.7101 -2 182 2003 1842 0.02575 -0.9997 -3 259 2005 1857 -0.96251 -0.2712 -4 30 2005 1861 0.48506 0.8745 -5 151 2005 1865 0.52943 -0.8484 -6 304 2006 1870 -0.87861 0.4775 +1 46 2003 1838 0.70253 0.7117 +2 182 2003 1842 0.03872 -0.9993 +3 259 2005 1857 -0.96134 -0.2754 +4 30 2005 1861 0.48251 0.8759 +5 151 2005 1865 0.54163 -0.8406 +6 304 2006 1870 -0.88205 0.4712 \end{verbatim} \end{kframe} \end{knitrout} @@ -1114,20 +1114,20 @@ There are 4750 data points, and 4750 days. \hlkwd{head}\hlstd{(Sample)} \end{alltt} \begin{verbatim} - Date ConcLow ConcHigh Uncen ConcAve Julian Month -1 2000-01-04 1.59 1.59 1 1.59 54789 1 -2 2000-02-03 1.54 1.54 1 1.54 54819 2 -3 2000-02-15 1.37 1.37 1 1.37 54831 2 -4 2000-02-19 1.24 1.24 1 1.24 54835 2 -5 2000-03-23 0.52 0.52 1 0.52 54868 3 -6 2000-06-05 1.11 1.11 1 1.11 54942 6 - Day DecYear MonthSeq SinDY CosDY Q LogQ -1 4 2000 1801 0.06005 0.9982 2.747 1.0104 -2 34 2000 1802 0.54392 0.8391 3.936 1.3702 -3 46 2000 1802 0.70407 0.7101 10.845 2.3837 -4 50 2000 1802 0.75113 0.6602 15.518 2.7420 -5 83 2000 1803 0.98809 0.1539 56.917 4.0416 -6 157 2000 1806 0.43940 -0.8983 1.812 0.5946 + Date Q LogQ ConcLow ConcHigh Uncen ConcAve +1 2000-01-04 2.747 1.0104 1.59 1.59 1 1.59 +2 2000-02-03 3.936 1.3702 1.54 1.54 1 1.54 +3 2000-02-15 10.845 2.3837 1.37 1.37 1 1.37 +4 2000-02-19 15.518 2.7420 1.24 1.24 1 1.24 +5 2000-03-23 56.917 4.0416 0.52 0.52 1 0.52 +6 2000-06-05 1.812 0.5946 1.11 1.11 1 1.11 + Julian Month Day DecYear MonthSeq SinDY CosDY +1 54789 1 4 2000 1801 0.05576 0.9984 +2 54819 2 34 2000 1802 0.54031 0.8415 +3 54831 2 46 2000 1802 0.70101 0.7132 +4 54835 2 50 2000 1802 0.74829 0.6634 +5 54868 3 83 2000 1803 0.98742 0.1581 +6 54942 6 157 2000 1806 0.44325 -0.8964 \end{verbatim} \end{kframe} \end{knitrout} @@ -1263,10 +1263,11 @@ To see the raw code for a particular code, type the name of the function, withou \hlstd{removeDuplicates} \end{alltt} \begin{verbatim} -function(localSample=Sample) { - Sample1 <- localSample[!duplicated(localSample[c("DecYear","ConcHigh")]),] - - return(Sample1) +function (localSample = Sample) +{ + Sample1 <- localSample[!duplicated(localSample[c("DecYear", + "ConcHigh")]), ] + return(Sample1) } <environment: namespace:dataRetrieval> \end{verbatim} @@ -1350,7 +1351,7 @@ There are a few steps that are required in order to create a table in a Microsof 5 Suspended sediment discharge 1980-10-01 End Count Units 1 2012-05-09 529 deg C -2 2014-08-02 24321 ft3/s +2 2014-08-12 24331 ft3/s 3 2012-05-09 527 uS/cm @25C 4 1991-09-30 3651 mg/l 5 1991-09-30 3652 tons/day diff --git a/vignettes/figure/egretEx.pdf b/vignettes/figure/egretEx.pdf index 633d69d65134cb42a22450528d7e39efd57b7648..b19a3ca6a90f6f2c1038bf101bb85066cf226e3c 100644 Binary files a/vignettes/figure/egretEx.pdf and b/vignettes/figure/egretEx.pdf differ diff --git a/vignettes/figure/getNWIStemperaturePlot.pdf b/vignettes/figure/getNWIStemperaturePlot.pdf index 0aa6f3da9b47fa3f9992e32e2c5884cc76fc1a98..cdb9a4617bcf0656f994f4604bf05b3b7790144c 100644 Binary files a/vignettes/figure/getNWIStemperaturePlot.pdf and b/vignettes/figure/getNWIStemperaturePlot.pdf differ diff --git a/vignettes/figure/getQWtemperaturePlot.pdf b/vignettes/figure/getQWtemperaturePlot.pdf index b9f4ed9ed16bf6eaf7904973414c08394f37f5e7..27d6cf946d2b0340c1d7bf9b198fb1a9c2ba7a1c 100644 Binary files a/vignettes/figure/getQWtemperaturePlot.pdf and b/vignettes/figure/getQWtemperaturePlot.pdf differ