Creates a code block.
code_block(fun, next_elt = TRUE)
Function to execute within code block.
This function's argument list must include ...
.
It may also include any of the following named arguments:
state
, the participant's state object;
opt
, which is the test's option list as created by test_options()
;
input
, the current page's Shiny input object;
output
, the current page's Shiny output object;
session
, the current Shiny session object;
elts
, the timeline (i.e. list of test elements).
(Logical scalar) Whether to go to the next element
in the timeline once this page is completed.
This will typically be TRUE
,
except for special cases such as pages that load
testing sessions from file (get_p_id
).