import_actigraph_count_csv: Import Actigraph count data stored in Actigraph summary csv...

View source: R/import_data.R

import_actigraph_count_csvR Documentation

Import Actigraph count data stored in Actigraph summary csv format

Description

import_actigraph_count_csv imports Actigraph count data stored in Actigraph summary csv format, which was exported by Actilife.

Usage

import_actigraph_count_csv(
  filepath,
  count_col = 2,
  count_per_axis_cols = c(2, 3, 4)
)

Arguments

filepath

string. The filepath of the input data.

count_col

number. The index of column of Actigraph count (combined axes). If it is NULL, the function will use count_per_axis_cols to get the combined Actigraph count values.

count_per_axis_cols

numerical vector. The indices of columns of Actigraph count values per axis. If count_col is not NULL, the argument will be ignored. If it is NULL, the output dataframe will only have two columns without Actigraph count values per axis.

Value

dataframe. The imported actigraph count data, with the first column being the timestamps in POSIXct format, and the second column being the combined Actigraph count values, and the rest of columns being the Actigraph cont values per axis if available. Column names: HEADER_TIME_STAMP, ACTIGRAPH_COUNT, ACTIGRAPH_COUNT_X....

How is it used in MIMS-unit algorithm?

This function is a File IO function that is used to import Actigraph count data from Actigraph devices during algorithm validation.

Note

If both count_col and count_per_axis_cols are NULL, the function will raise an error.

See Also

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

Examples

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

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

  # Load file, default column for actigraph count values are 2, this file does not have
  # axial count values
  output = import_actigraph_count_csv(filepath, count_col=2)

  # Check output
  head(output)

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