get_youth_sojourns: Label Sojourns in a data stream according to the...

Description Usage Arguments Value Examples

View source: R/youth_get_sojourns.R

Description

Identify Sojourns using the algorithm of Hibbing et al. (2018)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
get_youth_sojourns(
  vm,
  short = 30,
  Output = c("Counts", "Raw"),
  Site = c("Hip", "Wrist"),
  epoch = 1,
  difference = 15,
  threshold = 100,
  verbose = FALSE
)

Arguments

vm

vector of triaxial accelerometer values, either the vector magnitude for activity counts, or the Euclidian Norm Minus One for raw acceleration

short

numeric scalar. Shortest allowable duration for a Sojourn. Should be detected automatically from the internally-stored grid search values for the attachment site (hip or wrist) and data type (counts or raw)

Output

the data type (counts or raw)

Site

the attachment site (hip or wrist)

epoch

the epoch length, in seconds

difference

the difference parameter

threshold

the threshold parameter

verbose

logical. Print processing updates to the console?

Value

A data frame (with nrow equal to length(vm)) that gives sojourn labels and durations

Examples

1
2
3
data(example_data, package = "Sojourn")
get_youth_sojourns(example_data$Vector.Magnitude,
  Output = "Counts", Site = "Hip")

Sojourn documentation built on May 8, 2021, 1:06 a.m.