###Load libraries and setup options

require(WQReview)
require(knitr)
opts_chunk$set(dev = 'png',out.width='1024px',out.height='750px',dpi=60)
###Load up the data
load(paste(outputDir,"/data.rda",sep=""))
###Subset to site network
qw.data$PlotTable <- subset(qw.data$PlotTable,SITE_NO %in% sites)
if(!is.null(reports$chemFlagTable))
{
reports$chemFlagTable <- subset(reports$chemFlagTable, SITE_NO %in% sites)
} else{}
if(!is.null(reports$pestFlagTable))
{
reports$pestFlagTable <- subset(reports$pestFlagTable, SITE_NO %in% sites)
} else{}
if(!is.null(reports$resultFlagTable))
{
reports$resultFlagTable <- subset(reports$resultFlagTable, SITE_NO %in% sites)  
} else{}

Network Data Summary

Flagged tables

Basic chemical flags

require(DT)
############################
###chemFlagTable
############################


###Render the table
datatable(
        reports$chemFlagTable,
        extensions = 'Buttons',
        options = list(
                scrollX=TRUE,
                autoWidth=TRUE,
                dom = 'Bfrtip',
    buttons = c('copy', 'csv', 'excel', 'pdf', 'print'))
)
#kable(reports$chemFalgTable)

Pesticide flags

require(DT)
############################
###pestFlagTable
############################


###Render the table
datatable(
        reports$pestFlagTable,
        extensions = 'Buttons',
        options = list(
                scrollX=TRUE,
                autoWidth=TRUE,
                dom = 'Bfrtip',
    buttons = c('copy', 'csv', 'excel', 'pdf', 'print'))
)

Result flags

require(DT)

############################
###resultFlagTable
############################

###Render the table

datatable(
        reports$resultFlagTable,
        extensions = 'Buttons',
        options = list(
                scrollX=TRUE,
                autoWidth=TRUE,
                dom = 'Bfrtip',
    buttons = c('copy', 'csv', 'excel', 'pdf', 'print'))
)

#kable(reports$resultFlagTable)
###Make links for each site
cat("\n\n")
for(l in 1:length(sites))
    {
    cat("#[",
        unique(qw.data$PlotTable$SITE_NO[which(qw.data$PlotTable$SITE_NO == sites[l])]),
        " ",
        unique(qw.data$PlotTable$STATION_NM[which(qw.data$PlotTable$SITE_NO == sites[l])]),
        "](",
        unique(qw.data$PlotTable$SITE_NO[which(qw.data$PlotTable$SITE_NO == sites[l])]),
        ".htm)",
        "\n",
        sep=""
    )

}


USGS-R/WQ-Review documentation built on Nov. 12, 2019, 9:51 a.m.