prepare_dataset: Prepare accelerometer data

View source: R/prepare_dataset.R

prepare_datasetR Documentation

Prepare accelerometer data

Description

This function reads an .agd file and then creates the vector magnitude variable as follows: vm = \sqrt{axis1^{2} + axis2^{2} + axis3^{2}}. The .agd file must contain at least the following columns:

  • axis1

  • axis2

  • axis3

  • steps

Usage

prepare_dataset(data)

Arguments

data

Path to an .agd file that was exported from ActiLife software.

Value

A dataframe.

Examples

file <- system.file("extdata", "acc.agd", package = "activAnalyzer")
mydata <- prepare_dataset(data = file)
head(mydata)


activAnalyzer documentation built on Sept. 24, 2024, 1:07 a.m.