load_and_parse: These are functions for pre-processing raw data, including...

Description Usage Arguments Details Examples

View source: R/preprocessing.R

Description

A couple of steps are requied for reading and cleaning the raw data:

Usage

1
load_and_parse(filename)

Arguments

filename

- Filename of the data file to load.

Details

1. Split the block condition information, of the form 'visworld_supervised_30', into the useful parts (the overall supervision condition and /b/ VOT) 2. Split the list ID (of the form 'BEACH_p_supervised') into its useful parts, which are the word class, actual category, and whether this _trial_ is supervised or unsupervised (only matters in the supervised condition) 3. Pull out the category of the image clicked on each trial (and convert to a 0/1 b/p response variable for later analysis) 4. Convert the /b/ vot condition variable to a factor to thwart ggplot defaults 5. Extract the numeric VOT of the actual stimulus.

The 'tidyr::separate' function really comes in handy with the first couple, and automagically cleans up the data frame by removing the original variabls.

Examples

1
data <- load_and_parse('data/supunsup-ALL-visworld.csv')

kleinschmidt/phonetic-sup-unsup documentation built on May 20, 2019, 12:33 p.m.