Learn R Programming

activAnalyzer (version 2.1.2)

prepare_dataset: 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)

Value

A dataframe.

Arguments

data

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

Examples

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

Run the code above in your browser using DataLab