process_records: Process raw jsPsych data

View source: R/process_records.R

process_recordsR Documentation

Process raw jsPsych data

Description

Process raw jsPsych data

Usage

process_records(x, .using = NULL, auto = default_parsers())

Arguments

x

Dataset with jsPsych records

.using

Parser function to use on each record. Use NULL for auto-detection.

auto

List of trial types and parser functions used for auto-detection.

Value

Original dataset with new column processed with nested results.

Examples

## Not run: 
fn <- demo_file("jspsych-html-button-response.json")
d  <- read_jspsych(fn)
d %>%
  filter(trial_type == trial_types$html_button_response) %>%
  process_records(.using = parse_html_button_response) %>%
  unnest(processed)
# auto-detected
d %>%
  filter(trial_type == trial_types$html_button_response) %>%
  process_records() %>%
  unnest(processed)

## End(Not run)

jirilukavsky/jspsychread documentation built on Jan. 29, 2023, 5:35 p.m.