xlit | R Documentation |
These functions calculate the mean/first/last timepoint where light levels are above or below a given threshold intensity within the given interval.
mlit(lightVar, timeVar, threshold, as_df = TRUE, wide = TRUE)
flit(lightVar, timeVar, threshold, as_df = TRUE, wide = TRUE)
llit(lightVar, timeVar, threshold, as_df = TRUE, wide = TRUE)
lightVar |
Numeric vector containing the light data. |
timeVar |
Vector containing the time data. Can be POSIXct or numeric. |
threshold |
Single numeric value or vector specifying threshold
intensities. The sign indicates above/below (see |
as_df |
Logical. Should the output be returned as a data frame? Defaults to TRUE. |
wide |
Logical. Should the output be returned in wide format? Defaults to TRUE. |
'mlit()' calculates the mean timing of light above/below threshold.
'flit()' calculates the first timing of light above/below threshold.
'llit()' calculates the last timing of light above/below threshold.
Data frame or matrix with pairs of threshold and calculated values. If wide is TRUE then variable names will be concatenated with the threshold.
Reid, K. J., Santostasi, G., Baron, K. G., Wilson, J., Kang, J., & Zee, P. C. (2014). Timing and Intensity of Light Correlate with Body Weight in Adults. PLOS ONE, 9(4), e92251. https://doi.org/10.1371/journal.pone.0092251
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.