nparACT_flex_loop: Extended Nonparametric Actigraphy Measures for Multiple...

Description Usage Arguments Value Author(s) Examples

Description

Function returns IS, IV, RA, L5, M10 as well as L5 and M10 start times for single actigraphy files. Additionally, it also returns the L value (Lflex) and the start time for a specified number of minutes. The function also returns a classic dual day plot for the data, a plot of minutewise averages across 24 hours as well as a plot for hourly averages across 24 hours.

Usage

1
nparACT_flex_loop(path, SR, cutoff = 1, minutes, plot = T, fulldays = T)

Arguments

path

Character string containing path to location of actigraphy files. Actigraphy files must contain a first column with a date/time vector, which must be of form YYYY-MM-DD HH:MM:SS or YYYY/MM/DD HH:MM:SS, i.e. in an unambiguous date format and a second column with numeric actigraphy values. Input files can either be text or comma separated value files.

SR

Sampling rate in Hz.

cutoff

Can be used to define a cutoff for actigraphy data. Default value is 1, i.e. all values are taken into account.

minutes

Number of minutes for which the Lflex value should be computed.

plot

If TRUE a plot is produced. Default is TRUE.

fulldays

If TRUE only data from multiples of 24 hours (i.e. full days) are included while the rest of the data are discarded. Default is TRUE.

Value

Data frame containing IS, IV and RA values for each file. Besides this, L5, M10 and Lflex (for the number of minutes specified) values are given along with the respective start times.

Author(s)

Christine Blume <christine.blume@sbg.ac.at> Nayantara Santhi <n.santhi@surrey.ac.uk> Manuel Schabus <manuel.schabus@sbg.ac.at>

Examples

1
2
3
4
5
6
7
8
9
# example function nparACT_flex_loop
data(sleepstudy)
name <- "sleepstudy_example"
newdir <- file.path(tempdir(),name)
dir.create(newdir, showWarnings = FALSE)
olddir <- setwd(newdir)
write.table(sleepstudy, file = "sleepstudy.txt", row.names=FALSE, col.names = FALSE)
r <- nparACT_flex_loop(newdir, SR = 4/60, minutes = 435)
setwd(olddir)

nparACT documentation built on May 2, 2019, 2:38 a.m.