
Last chance! 50% off unlimited learning
Sale ends in
This function computes daily anomalies from a vector containing the daily time series.
DailyAno(data, jdays = NULL, dates = NULL, calendar = NULL, na.rm = TRUE)
A vector of daily anomalies of the same length as parameter
data
.
A vector of daily data.
A vector of the corresponding day of the year. This vector must
be the same length as parameter data
.
If jdays
is not supplied, a vector of dates corresponding
to the observations in data
with defined calendar attributes.
A character indicating the calendar type.
A logical indicating whether missing values should be removed. If
na.rm
is FALSE an NA value in any of the arguments will cause a value
of NA to be returned, otherwise (TRUE by default) NA values are ignored.
# Time series in a vector example:
data <- 1:10
jdays <- c(rep(1, 5), rep(2, 5))
daily_anomaly <- DailyAno(data = data, jdays = jdays, na.rm = TRUE)
print(daily_anomaly)
Run the code above in your browser using DataLab