
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_Dataset()
import
- Import a light logger dataset or related data
-
import_Statechanges()
- Import data that contain
Datetimes
ofStatechanges
-
import_adjustment()
- Adjust device imports or make your own
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
-
durations()
- Calculate duration of data in each group
-
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
-
dst_change_summary()
- Get a summary of groups where a daylight saving time change occurs.
-
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
-
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.
-
gap_handler()
- Fill implicit gaps in a light logger dataset
-
remove_partial_data()
- Remove groups that have too few data points
-
cut_Datetime()
- Create Datetime bins for visualization and calculation
-
aggregate_Datetime()
- Aggregate Datetime data
-
aggregate_Date()
- Aggregate dates to a single day
-
create_Timedata()
- Create a Time-of-Day column in the dataset
-
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.
-
join_datasets()
- Join similar Datasets
-
dst_change_handler()
- Handle jumps in Daylight Savings (DST) that are missing in the data
Expand
Expanding light logger data through auxiliary data and/or reference data allows for a more comprehensive analysis.
-
data2reference()
- Create reference data from other data
-
sc2interval()
- Statechange (sc) Timestamps to Intervals
-
interval2state()
- Adds a state column to a dataset from interval data
-
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
-
number_states()
- Number non-consecutive state occurrences
-
sleep_int2Brown()
- Recode Sleep/Wake intervals to Brown state intervals
-
Brown_check()
- Check whether a value is within the recommended illuminance/MEDI levels by Brown et al. (2022)
-
Brown_rec()
- Set the recommended illuminance/MEDI levels by Brown et al. (2022)
-
Brown2reference()
- Add Brown et al. (2022) reference illuminance to a dataset
-
Brown_cut()
- Create a state column that cuts light levels into sections by Brown et al. (2022)
-
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_overview()
- Plot an overview of dataset intervals with implicit missing 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_heatmap()
- Plot a heatmap across days and times of day
-
gg_doubleplot()
- Double Plots
-
gg_photoperiod()
- Add photoperiods to gg_day() or gg_days() plots
-
gg_state()
- Add states to gg_day() or gg_days() plots
-
gg_gaps()
- Visualize gaps and irregular data
-
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
-
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
-
threshold_for_duration()
- Find threshold for given duration
-
timing_above_threshold()
- Mean/first/last timing above/below threshold.
-
spectral_integration()
- Integrate spectral irradiance with optional weighting
-
photoperiod()
extract_photoperiod()
add_photoperiod()
solar_noon()
- Calculate photoperiod and boundary times
-
gg_photoperiod()
- Add photoperiods to gg_day() or gg_days() plots
-
mean_daily()
- Calculate mean daily metrics from daily summary
-
mean_daily_metric()
- Calculate mean daily metrics from Time Series
-
symlog_trans()
- Scale positive and negative values on a log scale
-
reverse2_trans()
- Create a reverse transformation function specifically for date scales
-
Datetime_breaks()
- Create a (shifted) sequence of Datetimes for axis breaks
-
Datetime_limits()
- Find or set sensible limits for Datetime axis
-
photoperiod()
extract_photoperiod()
add_photoperiod()
solar_noon()
- Calculate photoperiod and boundary times
-
spectral_reconstruction()
- Reconstruct spectral irradiance from sensor counts
-
normalize_counts()
- Normalize counts between sensor outputs
-
summarize_numeric()
summarise_numeric()
- Summarize numeric columns in dataframes to means
-
log_zero_inflated()
exp_zero_inflated()
- Add a defined number to a numeric and log transform it
-
sample.data.environment
- Sample of wearable data combined with environmental data
-
alphaopic.action.spectra
- Alphaopic (+ photopic) action spectra
-
gain.ratio.tables
- Gain / Gain-ratio tables to normalize counts
-
supported_devices()
- Get all the supported devices in LightLogR
-
ll_import_expr()
- Get the import expression for a device