anomaly: Departure from the mean over a baseline period

View source: R/analysis.R

anomalyR Documentation

Departure from the mean over a baseline period

Description

Departure from the mean over a baseline period

Usage

anomaly(data, value, baseline = NULL, year_col = "year")

Arguments

data

Data frame with value (and year_col if a baseline is set)

value

Name of the column to use

baseline

Optional c(first_year, last_year). The default uses all rows.

year_col

Name of the year column for the baseline

Value

Numeric vector of anomalies, one for each row of data

Examples

df <- data.frame(year = 2001:2005, t2m = c(25, 26, 25.5, 27, 26.5))
anomaly(df, "t2m")

varunayan documentation built on Oct. 30, 2026, 1:07 a.m.