From c6adbbabf382ff06d2f7bd17c5d076558d34d9b1 Mon Sep 17 00:00:00 2001 From: Laura DeCicco <ldecicco@usgs.gov> Date: Mon, 18 Feb 2013 13:40:30 -0600 Subject: [PATCH] Cleaned up the messaging. --- R/populateDaily.r | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/R/populateDaily.r b/R/populateDaily.r index fa9bac2a..6ac2d62f 100644 --- a/R/populateDaily.r +++ b/R/populateDaily.r @@ -41,7 +41,16 @@ populateDaily <- function(rawData,qConvert,interactive=TRUE){ # rawData is a da nz<-length(zeros) - if(nz>0) qshift<-0.001*mean(localDaily$Q, na.rm=TRUE) else qshift<-0.0 + if(nz>0) { + + qshift<- 0.001*mean(localDaily$Q, na.rm=TRUE) + + cat("There were ", as.character(nz), " zero flow days \n") + cat("All days therefore had",as.character(qshift),"cms added to the discharge value.\n") + } else { + qshift<-0.0 + } + localDaily$Q<-localDaily$Q+qshift @@ -63,8 +72,7 @@ populateDaily <- function(rawData,qConvert,interactive=TRUE){ # rawData is a da difference <- (localDaily$Julian[dataPoints] - localDaily$Julian[1])+1 if (interactive){ cat("There are ", as.character(dataPoints), "data points, and ", as.character(difference), "days.\n") - cat("There are ",as.character(nz), "zero flow days\n") - cat("If there are any zero discharge days, all days had",as.character(qshift),"cubic meters per second added to the discharge value.\n") + #these next two lines show the user where the gaps in the data are if there are any n<-nrow(localDaily) for(i in 2:n) {if((localDaily$Julian[i]-localDaily$Julian[i-1])>1) cat("\n discharge data jumps from",as.character(localDaily$Date[i-1]),"to",as.character(localDaily$Date[i]))} -- GitLab