moving_analys: Moving average data analysis.

Description Usage Arguments Value Examples

View source: R/moving_analys.R

Description

Function for moving average trend statistics.

Usage

1
2
moving_analys(dates, values, start_year, end_year, window_width, cover_thresh,
  method_analys, weather_type = 1)

Arguments

dates

Input date vector.

values

Input values of time series

start_year

Start year of time frame to be analyzed

end_year

End year of time frame to be analyzed

window_width

Window width of moving averages

cover_thresh

Cover threshold when calculation conducted

method_analys

Select analytical method ("sens_slope", "mann_kendall", "mean", "snow_likelihood", "weather_likelihood", "snow_window_likeli_sens_slope", ""weather_type_window_likeli_sens_slope" or "snow_window_likeli_mk")

Value

Yearly cycle of e.g. trend magnitude or mean values

Examples

1
2
3
4
5
6
7
8
temp_slo <- moving_analys(dates = temperature$date, values= temperature[, 2],
                          start_year = 1985,
                          end_year = 2015,
                          window_width = 30,
                          cover_thres = 0.9,
                          method_analys = "sens_slope")

plot(temp_slo, type="l", ylab = "Trend mangitude [°C/year]", xlab="Day  of the year")

ERottler/alptempr documentation built on May 7, 2021, 1:12 a.m.