import_enmo_csv: Import ENMO data stored in csv csv

View source: R/import_data.R

import_enmo_csvR Documentation

Import ENMO data stored in csv csv

Description

import_enmo_csv imports ENMO data stored in a summary csv format, which was exported by the biobank data analysis tools.

Usage

import_enmo_csv(filepath, enmo_col = 2)

Arguments

filepath

string. The filepath of the input data.

enmo_col

number. The index of column of ENMO values in the csv file.

Value

dataframe. The imported ENMO data, with the first column being the timestamps in POSIXct format, and the second column being the ENMO values. Column names: HEADER_TIME_STAMP, ENMO.

How is it used in MIMS-unit algorithm?

This function is a File IO function that is used to import ENMO data from activity monitor devices 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_mhealth_csv_chunked(), import_mhealth_csv()

Examples

  # Use the enmo csv file shipped with the package
  filepath = system.file('extdata', 'enmo.csv', package='MIMSunit')

  # Check original data format
  readLines(filepath)[1:5]

  # Load file, default column for enmo values are 2
  output = import_enmo_csv(filepath, enmo_col=2)

  # Check output
  head(output)

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