trrrends | R Documentation |
trrrends(
x,
conf_level = 0.95,
alt_hypo = c("two-tailed", "greater", "less"),
continuity = TRUE,
na = c("rm", "drop", "approx", "lm", "fill", "extend", "aggregate", "mean", "median",
"min", "max", "fail")
)
x |
Timeseries vector. |
conf_level |
Confidence level used for calculating the upper and lower bounds of the Sen-Theil slope estimator. Defaults to 95 \itemalt_hypoAlternative hypothesis applied in the Mann-Kendall S statistic. \itemcontinuityLogical whether to apply continuity correction to Mann-Kendall statistics. Same correction is always applied to Sen-Theil slope estimation. \itemnaMethod reference for handling missing values. Missing values are dropped by default, but can also be replaced using a linear approximation, the nearest value, or a summary statistic (mean, median, min, max). |
Dataframe of all relevant trend statistics from the Sen-Theil, Mann-Kendall, and Kendall families of statistics. Applies a family of trend statistics: The Mann-Kendall S statistic, the Sen-Theil slope estimator, and Kendall's tau. ## Not run: dummy <- tibble::tibble(YEAR = c(2000:2020)) %>% dplyr::rowwise() %>% dplyr::mutate(RANDOM = runif(1, -33, 100)) %>% dplyr::ungroup() %>% dplyr::mutate(GRP = 'GROUP A') %>% dplyr::bind_rows(tibble::tibble(YEAR = c(2005:2020)) %>% dplyr::rowwise() %>% dplyr::mutate(RANDOM = runif(1, 33, 100)) %>% dplyr::ungroup() %>% dplyr::mutate(GRP = 'GROUP B')) %>% dplyr::bind_rows(tibble::tibble(YEAR = c(2000:2020)) %>% dplyr::rowwise() %>% dplyr::mutate(RANDOM = runif(1, 0, 1)) %>% dplyr::ungroup() %>% dplyr::mutate(GRP = 'GROUP C')) dummy %>% dplyr::group_by(GRP) %>% dplyr::mutate(RANDOM = ifelse(RANDOM >= 80, NA, RANDOM)) %>% dplyr::summarise(trrrends(RANDOM, conf_level = 0.95, alt_hypo = 'two-tailed', continuity = TRUE, na = 'median')) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.