import_actigraph_meta imports meta information stored in the Actigraph summary csv file.

import_actigraph_meta(filepath, header = TRUE)

Arguments

filepath

string. The filepath of the input data.

header

logical. Whether the Actigraph RAW or summary csv file includes column names. Default is TRUE.

Value

list. A list of Actigraph device meta information.

Details

The returned meta information includes following fields.

  • sr: Sampling rate in Hz.

  • fw: Firmware version. For example "1.7.0".

  • sw: Software version of Actilife. For example "6.13.0".

  • sn: Serial number of the device.

  • st: Start time of the data, in POSIXct format.

  • dt: Download time of the data, in POSIXct format.

  • at: Type of the device. Could be "MAT","CLE", "MOS" or "TAS", corresponding to different Actigraph devices.

  • imu: Whether the file is about Actigraph GT9X IMU data.

  • gr: The dynamic range in \(g\) unit.

  • vs: The voltage level of the device, may be used in AD conversion. See import_actigraph_csv.

  • res: The resolution or the number of bits used to store quantized voltage values of the device, may be used in AD conversion. See import_actigraph_csv.

How is it used in MIMS-unit algorithm?

This function is a File IO function that is used to get related meta information such as sampling rate, firmware version from Actigraph devices.

See also

Examples

default_ops = options() options(digits.secs=3) # Use the sample actigraph csv file provided by the package filepath = system.file('extdata', 'actigraph.csv', package='MIMSunit') # Check file format readLines(filepath)[1:15]
#> [1] "------------ Data File Created By ActiGraph GT3X ActiLife v6.13.3 Firmware v4.4.0 date format M/d/yyyy at 30 Hz Filter Normal -----------" #> [2] "Serial Number: MAT2A16099981" #> [3] "Start Time 11:21:00" #> [4] "Start Date 6/14/2018" #> [5] "Epoch Period (hh:mm:ss) 00:00:00" #> [6] "Download Time 15:17:47" #> [7] "Download Date 6/14/2018" #> [8] "Current Memory Address: 2545464" #> [9] "Current Battery Voltage: 4.21 Mode = 12" #> [10] "--------------------------------------------------" #> [11] "Axis1,Axis2,Axis3" #> [12] "-0.08,0.004,-1.052" #> [13] "-0.08,0.004,-1.056" #> [14] "-0.075,0.004,-1.056" #> [15] "-0.075,0.004,-1.052"
# Load the meta headers of input file import_actigraph_meta(filepath, header=TRUE)
#> $sr #> [1] 30 #> #> $fw #> [1] "4.4.0" #> #> $sw #> [1] "6.13.3" #> #> $sn #> [1] "MAT2A16099981" #> #> $st #> [1] "2018-06-14 11:21:00.000 UTC" #> #> $dt #> [1] "2018-06-14 15:17:47.000 UTC" #> #> $at #> [1] "MAT" #> #> $imu #> [1] FALSE #> #> $gr #> [1] "3" #> #> $vs #> [1] 4.21 #> #> $res #> [1] 12 #>
# Restore default options options(default_ops)