powered by
The function plots the autocorrelation function (ACF) for daily runoff time series. A number of days corresponding to the specified autocorr value is highlighted.
autocorr
gr_plot_acf(hdata, autocorr = 0.7, maxlag = 30, print = TRUE)
ggplot2 object representing the autocorrelation function (ACF) for daily runoff time series
ggplot2
data.frame with first column as Date and the second column as runoff
data.frame
Date
Numeric value of the autocorrelation for which the time period will be highlighted. Defaults to 0.7.
0.7
Integer value of the maximum daily lag used to calculate the correlation. Defaults to 30.
30
Boolean. Print plot? Defaults to TRUE. Use FALSE if you want to tweak the plot aesthetics before plotting.
TRUE
FALSE
library(grwat) # example Spas-Zagorye data is included with grwat package data(spas) head(spas) # plot ACF gr_plot_acf(spas, 0.65)
Run the code above in your browser using DataLab