import_mhealth_csv: Import raw multi-channel accelerometer data stored in mHealth...

View source: R/import_data.R

import_mhealth_csvR Documentation

Import raw multi-channel accelerometer data stored in mHealth Specification

Description

import_mhealth_csv imports the raw multi-channel accelerometer data stored in mHealth Specification. Note that this function will fail when loading data that have size too big to fit in the memory. For large data file, please use import_mhealth_csv_chunked to load.

Usage

import_mhealth_csv(filepath)

Arguments

filepath

string. The filepath of the input data.

Value

dataframe. The imported multi-channel accelerometer signal, with the first column being the timestamps in POSXlct format, and the rest columns being accelerometer values in g unit.

How is it used in MIMS-unit algorithm?

This function is a File IO function that is used to import data stored in mHealth Specification during algorithm validation.

See Also

Other File I/O functions: export_to_actilife(), import_actigraph_count_csv(), import_actigraph_csv_chunked(), import_actigraph_csv(), import_actigraph_meta(), import_activpal3_csv(), import_enmo_csv(), import_mhealth_csv_chunked()

Examples

  default_ops = options()
  options(digits.secs=3)
  # Use the sample mhealth csv file provided by the package
  filepath = system.file('extdata', 'mhealth.csv', package='MIMSunit')
  filepath

  # Load the file
  df = import_mhealth_csv(filepath)

  # Check loaded file
  head(df)

  # Check more
  summary(df)

  # Restore default options
  options(default_ops)

MIMSunit documentation built on June 21, 2022, 5:06 p.m.