nparACT_base_loop: Compute classic non-parametric actigraphy measures for...

nparACT_base_loopR Documentation

Compute classic non-parametric actigraphy measures for multiple files

Description

Computes the classic non-parametric actigraphy measures: interdaily stability (IS), intradaily variability (IV), relative amplitude (RA), as well as the L5 and M10 values and their respective start times for all actigraphy files in a specified folder.

Usage

nparACT_base_loop(path, SR, cutoff = 1, plot = TRUE, fulldays = TRUE)

Arguments

path

Character string. Path to the folder containing actigraphy files.

SR

Numeric. Sampling rate in Hertz (samples per second).

cutoff

Numeric. Activity threshold used to classify movement. Defaults to 1.

plot

Logical. If TRUE, generates diagnostic plots of the hourly grand-average activity profiles. Defaults to TRUE.

fulldays

Logical. If TRUE, data are truncated to include only complete 24-hour periods. Defaults to TRUE.

Details

Each file is expected to contain either two columns (time, activity) or three columns (date, time, activity). Time variables are internally converted to POSIXct. Missing values in the activity signal are not permitted.

Each file should contain either two columns (time, activity) or three columns (date, time, activity). Time variables are converted to POSIXct. Missing activity values are not allowed. The function filters activity, computes minute/hourly averages, calculates IS/IV/RA, and optionally plots grand-average activity profiles.

Value

A data frame with one row per file and the following columns:

IS

Interdaily stability

IV

Intradaily variability

RA

Relative amplitude

L5

Mean activity during the least active 5-hour period

L5_starttime

Start time of the L5 period

M10

Mean activity during the most active 10-hour period

M10_starttime

Start time of the M10 period


nparACT documentation built on Dec. 16, 2025, 5:09 p.m.