ReadSweepData: Read the Contents of the .txt File for a Sweep

Description Usage Arguments Details Value

Description

Read the contents of a .txt file, which contains the positional data recorded during a sweep.

Usage

1
ReadSweepData(txt, sensors = character(), n = 7, dropExtra = TRUE)

Arguments

txt

A character vector of paths to .txt files.

sensors

A character vector or list of character vectors, the names for sensors that were attached to the participant and connected to sockets in the Carstens Sensin box. The position of a name in this vector is interpreted as the number of the socket to which the sensor was connected. Default is character(). See FormatSensors.

n

A numeric, the number of data channels that are recorded per sensor. Default is 7, which is consistent with Carstens data format AG50xDATA_V003, under which each sensor comprises data channels: x, y, z, phi, theta, rms, extra. See FormatChannels.

dropExtra

If TRUE, then the extra channel for each sensor is dropped from the data, since this channel is only a placeholder for future development by Carstens and contains no data. If FALSE, then the extra channels are kept.

Details

ReadSweepData is vectorized over both txt and sensors. If txt is a vector of more than one path to a .txt file, and if sensors is a character vector, then the elements of sensors are recycled as the sensor-names for each .txt file. To specify different sensor names for each .txt file, sensors should be a list with the same length as txt and whose elements are character vectors.

Value

If txt is a single character string, then a data table, the names of whose variables are determined by expanding the sensors argument through FormatChannels, and optionally dropping the channels suffixed by extra.

If txt is a character vector with more than one element, then a list whose elements are data tables structured as described above.


patrickreidy/ag501 documentation built on May 30, 2019, 10:01 p.m.