Time_long: Timne Metrics for Whole Dataset

Description Usage Arguments Value Examples

View source: R/Time_long.R

Description

This function is a whole dataset wrapper for Time

Usage

1
2
Time_long(count.data, weartime, thresh, smallerthan = TRUE,
  bout.length = 1)

Arguments

count.data

data.frame of dimension n*1442 containing the 1440 minute activity data for all n subject days. The first two columns have to be ID and Day.

weartime

data.frame with dimension of count.data. The first two columns have to be ID and Day.

thresh

threshold to binarize the data.

smallerthan

Find a state that is smaller than a threshold, or greater than or equal to.

bout.length

minimum duration of defining an active bout; defaults to 1.

Value

A dataframe with some of the following columns

ID

identifier of the person

Day

indicator of which day of activity it is, can be a numeric vector of sequence 1,2,... or a string of date

time

time of certain state

Examples

1
2
3
4
5
data(example_activity_data)
count = example_activity_data$count
wear = example_activity_data$wear
sed_all = Time_long(count.data = count,weartime = wear,
thresh = 100,bout.length = 1,smallerthan = TRUE)

junruidi/actigraphy documentation built on Sept. 25, 2019, 7:48 a.m.