test_trends: Thiel-Sen Trend Test

View source: R/test-trends.R

test_trendsR Documentation

Thiel-Sen Trend Test

Description

Analyses time series using the Thiel-Sen estimate of slope. It requires at least 6 years of data.

Usage

test_trends(
  data,
  breaks = NULL,
  FUN = "median",
  messages = getOption("wqbc.messages", default = TRUE)
)

Arguments

data

The data.frame to analyse.

breaks

A numeric vector used to create groups of consecutive months, if NULL the full year is used.

FUN

The function to use for yearly summaries, e.g. median, mean, or max.

messages

A flag indicating whether to print messages.

Details

The data must contain the columns Station, Date, Variable, Value, and Units.

Value

A tibble data.frame with rows for each Station, Variable, and month grouping, and additional columns for the sen slope estinate, 95\

See Also

zyp.sen

Examples

data <- wqbc::yuepilon
trend <- test_trends(data, breaks = 6, messages = TRUE)
## Not run: 
demo(test_trends)

## End(Not run)

bcgov/wqbc documentation built on Feb. 11, 2023, 11:15 p.m.