midpointCE: Midpoint of cumulative light exposure.

View source: R/midpointCE.R

midpointCER Documentation

Midpoint of cumulative light exposure.

Description

This function calculates the timing corresponding to half of the cumulative light exposure within the given time series.

Usage

midpointCE(lightVar, timeVar, as_df = TRUE)

Arguments

lightVar

Numeric vector containing the light data. Missing values are replaced with 0.

timeVar

Vector containing the time data. Can be POSIXct or numeric.

as_df

Logical. Should the output be returned as a data frame? Defaults to TRUE.

Value

Single column data frame or vector.

References

Shochat, T., Santhi, N., Herer, P., Flavell, S. A., Skeldon, A. C., & Dijk, D.-J. (2019). Sleep Timing in Late Autumn and Late Spring Associates With Light Exposure Rather Than Sun Time in College Students. Frontiers in Neuroscience, 13. https://doi.org/10.3389/fnins.2019.00882


steffenhartmeyer/lightdosimetry documentation built on Jan. 29, 2024, 12:48 p.m.