##`r fetchReportMetadataField(data,'title')` Report
**Location:** `r fetchReportMetadataField(data,'stationId')` `r fetchReportMetadataField(data,'stationName')` **Selected Time Series:** `r fetchReportMetadataField(data,'timeseriesLabel')`
**Period:** `r as.Date(fetchReportMetadataField(data,'startDate'))` to `r as.Date(fetchReportMetadataField(data,'endDate'))` **Created:** `r sprintf("%s (%s)", Sys.time(), Sys.timezone())` `r if (length(author) != 0) { paste("**Author:**",author[[1]]) }` `r if (length(author) == 0) { paste("**Author:** Username")}`
`r if(fetchReportMetadataField(data, 'excludeComments')){ paste("**Advanced Options: ** Comments excluded.") }`   '*' = Associated Highest Instantaneous Value and Date information will always be blank for the first visit in this report. `r readingsData <- parseFieldVisitReadings(data)` `r if(!isEmptyOrBlank(readingsData) && containsOutsideUncertainty(readingsData$diffPeak)){ paste("'**' = Corrected value is outside of the peak verification reading accounting for uncertainties, and the difference is >0.05 feet. If this is the annual peak, input the peak stage reading into the corrected time series. See SW Memo 2014.06: http://water.usgs.gov/admin/memo/SW/sw14.06_revised.html")}`

tbl <- sitevisitpeakTable(readingsData,fetchReportMetadataField(data,'excludeComments'),fetchReportMetadataField(data,'timezone'))
library(htmlTable)

if(!identical(tbl, "The dataset requested is empty.")){
  if(isNullOrFalse(fetchReportMetadataField(data,'excludeComments'))){
    groupConfig <- c(4,6,5)
    groupAlign <- "|rrrr|rrrrrr|rrrrr|"
  } else {
    groupConfig <- c(4,5,5)
    groupAlign <- "|rrrr|rrrrr|rrrrr|"
  }

  htmlTable(tbl, 
    cgroup=c("Field Visit Information","Peak Verification Information","*Associated Highest Instantaneous Value and Date"),
    n.cgroup=groupConfig,
    col.rgroup = c("none", "#F7F7F7"), css.cell = "padding-left: 1em; padding-right: 1em; padding-top:.5em;padding-bottom:.5em;",
    align=groupAlign,
    rnames=FALSE)
}

if(!identical(tbl, "The dataset requested is empty.")){
  tbl2 <- formatQualifiersTable(readAllFieldVisitQualifiers(readingsData))
  if(!isEmptyOrBlank(tbl2)){
    kable(tbl2, align='l', row.names=FALSE, caption = "Qualifiers")
  }
}

r if(identical(tbl, "The dataset requested is empty.")) {paste(tbl)}

r printVersionStrings()



USGS-R/repgen documentation built on April 14, 2021, 2:47 p.m.