gr_plot_tests {grwat} | R Documentation |
Plot change year density
Description
The function extracts change years from results of gr_test_vars()
and plots their probability density. Since for every variable the change year is individual, this procedure allows finding the one most probable year, which is the mode of the distribution. This year is highlighted by the line and labeled on the plot.
Usage
gr_plot_tests(tests, type = "year", print = TRUE)
Arguments
tests |
|
type |
Character string type of the plot. Currently only |
print |
Boolean. Print plot? Defaults to |
Value
ggplot2
object representing the selected type of the tested variable
Examples
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)
# plot change year from Pettitt test
gr_plot_tests(tests, type = 'year')
[Package grwat version 0.0.4 Index]