Joins one or more monthly indices by year and month. Because an index has no spatial dimension, every observation in a month receives the same value.
Arguments
- dat
a data frame or
sfobject with year and month columns- indices
index names to attach, or a data frame from
fetch_climate_index()- years
years to fetch; defaults to those present in
dat- year_col, month_col
names of the year and month columns
Examples
if (FALSE) { # \dontrun{
observations <- attach_climate_index(observations, c("NAO", "AMO"))
} # }