
Package index
Import
Wearable light logger data can be imported from a variety of sources, i.e., exports from measurement devices or online databases. This section also includes functions to import auxiliary data, such as sleep/wake data. The family of import functions works on a variety of device-specific files through import_*()
.
-
import_adjustment()
- Adjust device imports or make your own
-
import_Dataset()
import
- Import a light logger dataset or related data
-
import_Statechanges()
- Import data that contain
Datetimes
ofStatechanges
Insight
Functions to gain more insight into the data. Functions in this section will not return a version of the input dataset, but rather information based on it.
-
count_difftime()
- Counts the Time differences (epochs) per group (in a grouped dataset)
-
dominant_epoch()
- Determine the dominant epoch/interval of a dataset
-
dst_change_summary()
- Get a summary of groups where a daylight saving time change occurs.
-
durations()
- Calculate duration of data in each group
-
photoperiod()
extract_photoperiod()
add_photoperiod()
solar_noon()
- Calculate photoperiod and boundary times
-
extract_clusters()
add_clusters()
- Find and extract clusters from a dataset
-
extract_states()
- Extract summaries of states
-
extract_metric()
- Add metrics to extracted sSummary
-
extract_gaps()
- Extract gap episodes from the data
-
gapless_Datetimes()
- Create a gapless sequence of Datetimes
-
gap_finder()
- Check for and output gaps in a dataset
-
gap_table()
- Tabular summary of data and gaps in all groups
-
has_gaps()
- Does a dataset have implicit gaps
-
has_irregulars()
- Does a dataset have irregular data
Process
Functions to process light logger data, e.g., to validate and clean data, to filter, cut or aggreagate data, or to join datasets. All of these functions will return a version of the input dataset.
-
add_Time_col()
- Create a Time-of-Day column in the dataset
-
add_Date_col()
- Create a Date column in the dataset
-
aggregate_Date()
- Aggregate dates to a single day
-
aggregate_Datetime()
- Aggregate Datetime data
-
create_Timedata()
- create_Timedata
-
cut_Datetime()
- Create Datetime bins for visualization and calculation
-
dst_change_handler()
- Handle jumps in Daylight Savings (DST) that are missing in the data
-
filter_Datetime()
filter_Date()
- Filter Datetimes in a dataset.
-
filter_Datetime_multiple()
- Filter multiple times based on a list of arguments.
-
filter_Time()
- Filter Times in a dataset.
-
gap_handler()
- Fill implicit gaps in a light logger dataset
-
join_datasets()
- Join similar Datasets
-
remove_partial_data()
- Remove groups that have too few data points
Expand
Expanding light logger data through auxiliary data and/or reference data allows for a more comprehensive analysis.
-
photoperiod()
extract_photoperiod()
add_photoperiod()
solar_noon()
- Calculate photoperiod and boundary times
-
extract_clusters()
add_clusters()
- Find and extract clusters from a dataset
-
add_states()
- Add states to a dataset based on groups and start/end times
-
Brown2reference()
- Add Brown et al. (2022) reference illuminance to a dataset
-
Brown_check()
- Check whether a value is within the recommended illuminance/MEDI levels by Brown et al. (2022)
-
Brown_cut()
- Create a state column that cuts light levels into sections by Brown et al. (2022)
-
Brown_rec()
- Set the recommended illuminance/MEDI levels by Brown et al. (2022)
-
data2reference()
- Create reference data from other data
-
interval2state()
- Adds a state column to a dataset from interval data
-
number_states()
- Number non-consecutive state occurrences
-
sc2interval()
- Statechange (sc) Timestamps to Intervals
-
sleep_int2Brown()
- Recode Sleep/Wake intervals to Brown state intervals
-
spectral_reconstruction()
- Reconstruct spectral irradiance from sensor counts
Visualize
Functions to visualize light logger data, e.g., to plot light exposure or to plot sleep/wake data.
-
gg_day()
- Create a simple Time-of-Day plot of light logger data, faceted by Date
-
gg_days()
- Create a simple datetime plot of light logger data, faceted by group
-
gg_doubleplot()
- Double Plots
-
gg_gaps()
- Visualize gaps and irregular data
-
gg_heatmap()
- Plot a heatmap across days and times of day
-
gg_overview()
- Plot an overview of dataset intervals with implicit missing data
-
gg_photoperiod()
- Add photoperiods to gg_day() or gg_days() plots
-
gg_state()
- Add states to gg_day() or gg_days() plots
-
barroso_lighting_metrics()
- Circadian lighting metrics from Barroso et al. (2014)
-
bright_dark_period()
- Brightest or darkest continuous period
-
centroidLE()
- Centroid of light exposure
-
disparity_index()
- Disparity index
-
dose()
- Calculate the dose (value·hours)
-
duration_above_threshold()
- Duration above/below threshold or within threshold range
-
exponential_moving_average()
- Exponential moving average filter (EMA)
-
frequency_crossing_threshold()
- Frequency of crossing light threshold
-
intradaily_variability()
- Intradaily variability (IV)
-
interdaily_stability()
- Interdaily stability (IS)
-
midpointCE()
- Midpoint of cumulative light exposure.
-
nvRC()
- Non-visual circadian response
-
nvRC_circadianDisturbance()
nvRC_circadianBias()
nvRC_relativeAmplitudeError()
- Performance metrics for circadian response
-
nvRD()
- Non-visual direct response
-
nvRD_cumulative_response()
- Cumulative non-visual direct response
-
period_above_threshold()
- Length of longest continuous period above/below threshold
-
pulses_above_threshold()
- Pulses above threshold
-
spectral_integration()
- Integrate spectral irradiance with optional weighting
-
threshold_for_duration()
- Find threshold for given duration
-
timing_above_threshold()
- Mean/first/last timing above/below threshold.
-
photoperiod()
extract_photoperiod()
add_photoperiod()
solar_noon()
- Calculate photoperiod and boundary times
-
gg_photoperiod()
- Add photoperiods to gg_day() or gg_days() plots
-
Datetime2Time()
- Convert Datetime columns to Time columns
-
Datetime_breaks()
- Create a (shifted) sequence of Datetimes for axis breaks
-
Datetime_limits()
- Find or set sensible limits for Datetime axis
-
log_zero_inflated()
exp_zero_inflated()
- Add a defined number to a numeric and log transform it
-
mean_daily()
- Calculate mean daily metrics from daily summary
-
mean_daily_metric()
- Calculate mean daily metrics from Time Series
-
normalize_counts()
- Normalize counts between sensor outputs
-
photoperiod()
extract_photoperiod()
add_photoperiod()
solar_noon()
- Calculate photoperiod and boundary times
-
reverse2_trans()
- Create a reverse transformation function specifically for date scales
-
spectral_reconstruction()
- Reconstruct spectral irradiance from sensor counts
-
summarize_numeric()
summarise_numeric()
- Summarize numeric columns in dataframes to means
-
symlog_trans()
- Scale positive and negative values on a log scale
-
alphaopic.action.spectra
- Alphaopic (+ photopic) action spectra
-
gain.ratio.tables
- Gain / Gain-ratio tables to normalize counts
-
ll_import_expr()
- Get the import expression for a device
-
sample.data.environment
- Sample of wearable data combined with environmental data
-
sample.data.irregular
- Sample of highly irregular wearable data
-
supported_devices()
- Get all the supported devices in LightLogR