Rate of change since the previous calendar by, at each location: how fast
conditions are shifting, as distinct from what they currently are. A water
mass warming rapidly is a different habitat from one sitting at the same
temperature.
Arguments
- env_dat
an
sfPOINT object with one row per location and time step, as datamatch's access functions return- vars
covariate columns to differentiate;
NULLdoes all of them- by
the calendar unit to look back by:
"hour","day","month"or"year". Required, with no default, for the reasons given inlag_covariate().- per
time unit the rate is expressed in:
"hour","day","month"or"year". Defaults toby, so a monthly lag gives the change per month exactly. A different unit divides by the actual elapsed days, using a mean month of 30.4375 days and a year of 365.25.- suffix
suffix for the new columns
Details
The "previous" step is the one stamped exactly one by earlier, as in
lag_covariate(), so a gap gives NA and not a rate that quietly spans two
months. A step with no such predecessor, including the first, is NA.