while_loop | R Documentation |
This function creates a "while loop" in the participant's testing session. This "while loop" corresponds to the following procedure:
Check whether a condition (termed test
) is satisfied.
If the condition is satisfied,
execute a series of test elements (termed logic
),
otherwise exit the while loop.
Loop back to step 1.
while_loop(test, logic)
test |
Test function to execute.
Argument list should include |
logic |
List of psychTestR test elements. |
The previous version of this function, loop_while
,
always executed the series of test elements at least once,
even if the condition was never satisfied.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.