centroidLE | R Documentation |
This function calculates the centroid of light exposure as the mean of the time vector weighted in proportion to the corresponding light intensity.
centroidLE(lightVar, timeVar, bin_size = NULL, as_df = TRUE)
lightVar |
Numeric vector containing the light data. |
timeVar |
Vector containing the time data. Can be POSIXct or numeric. |
bin_size |
Numeric value or character specifying size of bins to average light data. If timeVar is POSIXct it must be a string with the time followed by its unit (e.g., "1 hour", "30 mins"). If NULL then no binning will be performed. Defaults to NULL. |
as_df |
Logical. Should the output be returned as a data frame? Defaults to TRUE. |
Single column data frame or vector.
Phillips, A. J. K., Clerx, W. M., O’Brien, C. S., Sano, A., Barger, L. K., Picard, R. W., Lockley, S. W., Klerman, E. B., & Czeisler, C. A. (2017). Irregular sleep/wake patterns are associated with poorer academic performance and delayed circadian and sleep/wake timing. Scientific Reports, 7(1), 3216. https://doi.org/10.1038/s41598-017-03171-4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.