gr_kable_tests: Tabular representation of tests

View source: R/report.R

gr_kable_testsR Documentation

Tabular representation of tests

Description

This function is used to represent the results of gr_test_vars() in a tabular form. Used mainly in gr_report(), but can be used for your own purposes.

Usage

gr_kable_tests(tests, format = "html")

Arguments

tests

list of tests as returned by gr_test_vars() function.

format

Character string encoding the type of output. Currently 'html' only is supported.

Value

HTML table as returned by knitr::kable() function.

Examples

if (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 from 1965 to 1990
  vars = gr_summarize(sep, 1965, 1990)
  
  # test all variables
  tests = gr_test_vars(vars)
  
  # kable tests
  gr_kable_tests(tests)

}

grwat documentation built on Nov. 2, 2023, 5:21 p.m.