read_jspsych: Reads jsPsych data into tibble

View source: R/read_jspsych.R

read_jspsychR Documentation

Reads jsPsych data into tibble

Description

By default, the code expects a file with a single JSON structure with white spaces and line delimiters (single = T). The alternative behaviour (single = F) expects a format with multiple JSON records, each in a single line. Results stored in JATOS server follow this structure.

Usage

read_jspsych(filepath, single = T)

Arguments

filepath

File to read

single

Indicates whether the file contains a single record or multiple records (each on separate line)

Value

A tibble with each trial/plugin result as a separate line. The tibble features following columns:

  • trial_type (string) - The name of the plugin used to run the trial.

  • trial_index (numeric) - The index of the current trial across the whole experiment.

  • time_elapsed (numeric) - The number of milliseconds between the start of the experiment and when the trial ended.

  • internal_node_id (string) - A string identifier for the current TimelineNode.

  • raw (list) - list column with all plugin data

See Also

parse_single_record()

Examples

read_jspsych(demo_file("jspsych-html-button-response.json"))

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