View source: R/metric_disparity_index.R
disparity_index | R Documentation |
This function calculates the continuous disparity index as described in Fernández-Martínez et al. (2018).
disparity_index(Light.vector, na.rm = FALSE, as.df = FALSE)
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 |
Single column data frame or vector.
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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/ecs2.2527")}
Hartmeyer, S.L., Andersen, M. (2023). Towards a framework for light-dosimetry studies: Quantification metrics. Lighting Research & Technology. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1177/14771535231170500")}
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()
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)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.