Learn R Programming

GGIR (version 2.3-0)

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(data,n=c(),sf,ii,TW=c(),lb=c(),hb=c(),gravity = 1)

Arguments

data

Three column matrix with x, y, and z acceleration data

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)
  data = cbind(Gx, Gy, Gz)
  EuclideanNorm = g.metric(data,sf=40,ii=3,gravity = 1)	
# }

Run the code above in your browser using DataLab