ReadSweep: Read the Sensor Data Recorded During a Sweep

Description Usage Arguments Details Value

Description

Read the head-corrected (and biteplane-rotated) position and rotation data from a .txt file and its metadata from the header of a .pos file.

Usage

1
2
ReadSweep(pos = "", txt = "", sweep = NULL, sensors = character(),
  dropExtra = TRUE, simplify = TRUE)

Arguments

pos

A character vector of paths to .pos files.

txt

A character vector of paths to .txt files.

sweep

A character vector, the path to and basenames (without extensions) of sweeps. The names of the .pos and .txt files for the sweeps will be constructed by appending the appropriate file extensions. Default is NULL. If not NULL, then -.pos and -.txt completions of sweep override any provided values of the pos and txt arguments.

sensors

A character vector, 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 and 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.

simplify

If TRUE, then the data tables for the sweeps are row-binded together into a single data table. If FALSE, then the data tables for the sweeps are returned as elements of a list.

Details

ReadSweep is vectorized over pos, txt, and sensors. pos and txt should be vectors of the same length ordered such that the positions on these vectors correspond to the .pos and .txt files, respectively, of the same sweep. Alternatively, multiple sweeps can be specified by passing a character vector to the sweep argument. If multiple sweeps are specified, and if sensors is a character vector, then the elements of sensors are recycled as the sensor-names for each sweep. To specify different sensor names for each sweep, sensors should be a list with the same length as the number of sweeps and whose elements are character vectors.

Value

A list or nested data frame with the following variables:


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