Build a timeline from trials

build_timeline(...)

Arguments

...

trial objects to add to this timeline

Value

An object of class "timeline"

Details

Experiments in jsPsych are specified in terms of a "timeline" object, where each timeline can consist of one or more "trial" objects and timelines can contain other timelines. In pure jsPsych it is possible to define a "bare" trial that is not contained within a timeline (the trial is essentially a timeline) but jaysire is slightly more restrictive. To build a timeline in jaysire, the output of trial_ functions need to be passed through the build_timeline() function to create a properly constructed timeline object.

Once constructed, behaviour and execution of a timeline can be modified using a variety of functions. A timeline can be looped using the display_while() function, or executed contiionally using the display_if() function. Timeline variables can be attached using set_variables() and other parameters can be passed to the timeline using set_parameters().