g.applymetrics: Extract metrics from acceleration signals

Description Usage Arguments Value Author(s) Examples

View source: R/g.applymetrics.R

Description

Function to extract metrics from acceleration signal. Not intended for direct use by user

Usage

1
  g.applymetrics(Gx,Gy,Gz,n,sf,ws3,metrics2do)

Arguments

Gx

y acceleration signal

Gy

y acceleration signal

Gz

z acceleration signal

n

filter order, only needed if a metric is selected that involves a frequency filter

sf

sample frequency

ws3

Epoch size in seconds

metrics2do

Dataframe with Boolean indicator for all metrics whether they should be extracted or not. For instance, metrics2do$do.bfen = TRUE, indicates that the bfen metric should be extracted

Value

Dataframe with metric values in columns average per epoch (ws3)

Author(s)

Vincent T van Hees <vincentvanhees@gmail.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
  Gx = runif(n=10000,min=0,max=2)
  Gy = runif(n=10000,min=1,max=3)
  Gz = runif(n=10000,min=0,max=2)
  metrics2do = data.frame(do.bfen=TRUE,do.enmo=TRUE,do.lfenmo=FALSE,
  do.en=FALSE,do.hfen=FALSE,do.hfenplus=FALSE,do.mad=FALSE,do.anglex=FALSE,
  do.angley=FALSE,do.anglez=FALSE,do.roll_med_acc_x=FALSE,
  do.roll_med_acc_y=FALSE,do.roll_med_acc_z=FALSE,
  do.dev_roll_med_acc_x=FALSE,do.dev_roll_med_acc_y=FALSE,
  do.dev_roll_med_acc_z=FALSE,do.enmoa=FALSE)
  extractedmetrics = g.applymetrics(Gx,Gy,Gz,n=4,sf=40,ws3=5,metrics2do)

PeteJWatson/ggircal documentation built on Nov. 24, 2021, 11:14 a.m.