fic: Frequency of intensity changes

View source: R/fic.R

ficR Documentation

Frequency of intensity changes

Description

This functions calculates the times a given threshold intensity is crossed.

Usage

fic(lightVar, threshold, na_rm = FALSE, as_df = TRUE, wide = TRUE)

Arguments

lightVar

Numeric vector containing the light data.

threshold

Single numeric value or vector specifying threshold intensities. The sign indicates above/below (see threshold).

na_rm

Logical. Should missing light values be removed? Defaults to FALSE.

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.

Value

Data frame or matrix with pairs of threshold and calculated values. If 'wide' is TRUE then variable names will be concatenated with the threshold.

References

Alvarez, A. A., & Wildsoet, C. F. (2013). Quantifying light exposure patterns in young adult students. Journal of Modern Optics, 60(14), 1200–1208. https://doi.org/10.1080/09500340.2013.845700


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