Usage
randwin(repeats = 1, xvar, cdate, bdate, baseline, furthest, closest, stat,
func, type, cutoff.day, cutoff.month, cmissing = FALSE, cinterval = "day",
upper = NA, lower = NA, thresh = FALSE, centre = NULL)
Arguments
repeats
The number of times that data will be randomised and analysed
for climate windows.
xvar
A list object containing all climate variables of interest.
Please specify the parent environment and variable name (e.g. Climate$Temp).
cdate
The climate date variable (dd/mm/yyyy). Please specify the parent
environment and variable name (e.g. Climate$Date).
bdate
The biological date variable (dd/mm/yyyy). Please specify the
parent environment and variable name (e.g. Biol$Date).
baseline
The baseline model structure used for testing correlation.
Currently known to support lm, glm, lmer and glmer objects.
furthest
The furthest number of time intervals (set by cinterval) back
from the cutoff date or biological record that will be included in the
climate window search.
closest
The closest number of time intervals (set by cinterval) back
from the cutoff date or biological record that will be included in the
climate window search.
stat
The aggregate statistic used to analyse the climate data. Can
currently use basic R statistics (e.g. mean, min), as well as slope.
Additional aggregate statistics can be created using the format function(x)
(...). See FUN in
func
The functions used to fit the climate variable. Can be linear
("lin"), quadratic ("quad"), cubic ("cub"), inverse ("inv") or log ("log").
type
fixed or variable, whether you wish the climate window to be
variable (i.e. the number of days before each biological record is
measured) or fixed (i.e. number of days before a set point in time).
cutoff.day,cutoff.month
If type is "fixed", the day and month of the
year from which the fixed window analysis will start.
cmissing
TRUE or FALSE, determines what should be done if there are
missing climate data. If FALSE, the function will not run if missing
climate data is encountered. If TRUE, any records affected by missing
climate data will be removed from climate window analy
cinterval
The resolution at which climate window analysis will be
conducted. May be days ("day"), weeks ("week"), or months ("month"). Note the units
of parameters 'furthest' and 'closest' will differ depending on the choice
of cinterval.
upper
Cut-off values used to determine growing degree days or positive
climate thresholds (depending on parameter thresh). Note that when values
of lower and upper are both provided, climatewin will instead calculate an
optimal climate zone.
lower
Cut-off values used to determine chill days or negative
climate thresholds (depending on parameter thresh). Note that when values
of lower and upper are both provided, climatewin will instead calculate an
optimal climate zone.
thresh
TRUE or FALSE. Determines whether to use values of upper and
lower to calculate binary climate data (thresh = TRUE), or to use for
growing degree days (thresh = FALSE).
centre
Variable used for mean centring (e.g. Year, Site, Individual).
Please specify the parent environment and variable name (e.g. Biol$Year).