Learn R Programming

GGIR (version 1.8-1)

g.metric: Extract metrics from acceleration signals

Description

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

Usage

g.metric(Gx,Gy,Gz,n=c(),sf,ii,TW=c(),lb=c(),hb=c(),gravity = 1)

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

ii

Integer to indicate which metric should be derived

TW

Time window size in samples used if the metric involves a time window

lb

Cut-off frequency corresponding to the lower boundary of frequency filter

hb

Cut-off frequency corresponding to the higher boundary of frequency filter

gravity

Size of gravity, default = 1

Value

Vector of metric values at the same time resolution as the input data

Examples

Run this code
# NOT RUN {
  Gx = runif(n=10000,min=0,max=2)
  Gy = runif(n=10000,min=1,max=3)
  Gz = runif(n=10000,min=0,max=2)
  EuclideanNorm = g.metric(Gx,Gy,Gz,sf=40,ii=3,gravity = 1)	
# }

Run the code above in your browser using DataLab