disparity_index {LightLogR} | R Documentation |
Disparity index
Description
This function calculates the continuous disparity index as described in Fernández-Martínez et al. (2018).
Usage
disparity_index(Light.vector, na.rm = FALSE, as.df = FALSE)
Arguments
Light.vector |
Numeric vector containing the light data. |
na.rm |
Logical. Should missing values be removed? Defaults to FALSE |
as.df |
Logical. Should the output be returned as a data frame? If |
Value
Single column data frame or vector.
References
Fernández-Martínez, M., Vicca, S., Janssens, I. A., Carnicer, J., Martín-Vide, J., & Peñuelas, J. (2018). The consecutive disparity index, D: A measure of temporal variability in ecological studies. Ecosphere, 9(12), e02527. doi:10.1002/ecs2.2527
Hartmeyer, S.L., Andersen, M. (2023). Towards a framework for light-dosimetry studies: Quantification metrics. Lighting Research & Technology. doi:10.1177/14771535231170500
See Also
Other metrics:
bright_dark_period()
,
centroidLE()
,
duration_above_threshold()
,
exponential_moving_average()
,
frequency_crossing_threshold()
,
interdaily_stability()
,
intradaily_variability()
,
midpointCE()
,
nvRC()
,
nvRD()
,
nvRD_cumulative_response()
,
period_above_threshold()
,
pulses_above_threshold()
,
threshold_for_duration()
,
timing_above_threshold()
Examples
dataset1 <-
tibble::tibble(
Id = rep("A", 24),
Datetime = lubridate::as_datetime(0) + lubridate::hours(0:23),
MEDI = sample(0:1000, 24),
)
dataset1 %>%
dplyr::reframe(
"Disparity index" = disparity_index(MEDI)
)