Usage
mergeSites(tFirst, tSecond, type, twl, site, degElevation, distThreshold = 250, alpha = c(0, 15), plot = TRUE)
Arguments
tFirst
vector of sunrise/sunset times (e.g. 2008-12-01 08:30).
tSecond
vector of of sunrise/sunset times (e.g. 2008-12-01 17:30).
type
vector of either 1 or 2, defining tFirst
as sunrise or sunset respectively.
twl
data.frame containing twilights and at least tFirst
, tSecond
and type
site
a numerical vector
assigning each row to a particular
period. Stationary periods in numerical order and values >0,
migration/movement periods 0. This vector
will be used as the initial state.
degElevation
the sun elevation angle (in degrees) that defines twilight (e.g. -6 for "civil
twilight"). Either a single value, a vector
with the same length as
tFirst
or nrow(x)
.
distThreshold
a numerical
value defining the threshold of the distance under
which consequtive sites should be merged (in km).
alpha
mean and standard variation for position optimization process.
plot
logical
, if TRUE a plot comparing the inital and the final site selection.