jspsych / jsPsych

Create behavioral experiments in a browser using JavaScript
http://www.jspsych.org
MIT License
1.03k stars 668 forks source link

add ability to append data to all trials #136

Closed jodeleeuw closed 9 years ago

jodeleeuw commented 9 years ago

Often it's necessary to append some kind of data to all of the trials. For example, a subject number or condition assignment. This should be easier. Perhaps:

jsPsych.data.addProperty({
  subjectid: 2,
  condition: 'left-handed'
});

List can be arbitrary length with arbitrary key: value pairs. Will update all of the data currently stored, plus add it to any new data that comes in (allowing the method to be called before or after experiment.

jodeleeuw commented 9 years ago

Related to this: remove the append_data parameter from dataAsCSV and localSave.

jodeleeuw commented 9 years ago

Implemented on /dev. Will be released in v4.2