- Light.vector
Numeric vector containing the light data. Missing values will
be considered as FALSE
when comparing light levels against the threshold.
- Time.vector
Vector containing the time data. Can be POSIXct,
hms, duration, or difftime.
- comparison
String specifying whether the time above or below threshold
should be calculated. Can be either "above"
(the default) or "below"
. If
two values are provided for threshold
, this argument will be ignored.
- threshold
Single numeric value or two numeric values specifying the
threshold light level(s) to compare with. If a vector with two values is provided,
the timing corresponding to light levels between the two thresholds will be
calculated.
- min.length
The minimum length of a pulse. Can be either a
duration or a string. If it is a string, it needs to be a valid
duration string, e.g., "1 day"
or "10 sec"
. Defaults to
"8 mins"
as in Wilson et al. (2018).
- max.interrupt
Maximum length of each episode of interruptions. Can be either a
duration or a string. If it is a string, it needs to be a valid
duration string, e.g., "1 day"
or "10 sec"
. Defaults to
"2 mins"
as in Wilson et al. (2018).
- prop.interrupt
Numeric value between 0
and 1
specifying the
maximum proportion of the total number of interruptions. Defaults to 0.25
as in Wilson et al. (2018).
- epoch
The epoch at which the data was sampled. Can be either a
duration or a string. If it is a string, it needs to be
either "dominant.epoch"
(the default) for a guess based on the data, or a valid
duration string, e.g., "1 day"
or "10 sec"
.
- return.indices
Logical. Should the cluster indices be returned? Only works if
as.df
is FALSE
. Defaults to FALSE
.
- na.rm
Logical. Should missing values be removed for the calculation of
pulse metrics? Defaults to FALSE
.
- as.df
Logical. Should a data frame be returned? If TRUE
, a data
frame with seven columns ("n", "mean_level", "mean_duration", "total_duration",
"mean_onset", "mean_midpoint", "mean_offset") and the threshold (e.g., _{threshold}
)
will be returned. Defaults to FALSE
.