seasonTrend(x, first, last, type = c("slope", "slope.pct"),
method = c("mk", "lin"), plot = FALSE, xlab = NULL,
ylab = NULL, miss = FALSE, legend = FALSE, ...)type = "slope.pct", the slopes are multiplied by 100 and divided by the overall mean (not the median, which can be zero even in cases where a trend estimate is useful). If method = 'mk'. the Theil-Sen slope is calculated with the Mann-Kendall test of significance. Otherwise, linear regression is used to determine the slope and significance.If plot = TRUE, each time series is represented by a dot plot showing the trend for each season. The colour of the dot indicates whether the trend is significant or not. When method = 'mk', the dot shape (solid or empty circle) indicates whether the proportion of slopes joining the first and last fifths of the data is < 0.5 or not. If this value is 0.5 or more, the trend results may not be a good representation of the entire period and a different time window should be considered. Indication of missing values and the graph legend is optional.
Parameters can be passed to the plotting function, in particular, to facet_wrap in ncol (or nrow), which determines the number of columns (or rows) of plots, and scales, which can be set to "free_x" to allow the x-axis to change for each time series.
mannKen, plotSeason, facet_wrapx <- sfbayChla
seasonTrend(x, first=1978, last=2009, ncol = 4, plot = TRUE, legend = TRUE)
seasonTrend(x, type = 'slope.pct')Run the code above in your browser using DataLab