gr_report {grwat}R Documentation

Report hydrograph separation and variables

Description

This function generates a graphical HTML report that summarizes separation of hydrograph, its variables and their statistical properties. See example report generated by this command for spas dataset included in grwat package.

Usage

gr_report(
  sep,
  vars,
  output = "Report.html",
  year = NULL,
  exclude = NULL,
  temp = FALSE,
  prec = FALSE,
  span = 5,
  locale = "EN"
)

Arguments

sep

data.frame of hydrograph separation as returned by gr_separate() function.

vars

data.frame of hydrograph variables as returned by gr_summarize() function.

output

Character string path to the output file. Must have .html extension.

year

Integer value of year used to divide series in two samples compared by Student and Fisher tests. Defaults to NULL which means that the year is calculated automatically by Pettitt test. Defaults to NULL.

exclude

Integer vector of years to be excluded from reporting. Defaults to NULL.

temp

Boolean. Plot temperature on the top of hydrograph? Defaults to FALSE. If both temp = TRUE and prec = TRUE, then the axis is drawn for precipitation.

prec

Boolean. Plot precipitation on the top of hydrograph? Defaults to FALSE. If both temp = TRUE and prec = TRUE, then the axis is drawn for precipitation.

span

Integer number of days to accumulate precipitation for plotting. Defaults to 5.

locale

Character string locale. Currently only English ('EN') and Russian ('RU') locales are supported. Defaults to 'EN'.

Value

No return value, called for side effects

Examples

## Not run: 
  if (require("knitr") && require("rmarkdown") && require("kableExtra")) {
    library(grwat)
    
    data(spas) # example Spas-Zagorye data is included with grwat package
    
    # separate
    sep = gr_separate(spas, params = gr_get_params(reg = 'center'))
    
    # summarize
    vars = gr_summarize(sep)
    
    # report
    report = '~/Spas-Zagorye.html'
    
    gr_report(sep, vars, output = report)
    browseURL(report)
  }

## End(Not run)

[Package grwat version 0.0.4 Index]