Description Usage Arguments Details Value See Also Examples
Make subjects wait for other subjects.
1 | checkpoint(wait_for = "all", name = "No name")
|
wait_for |
"all", "none", "ever" or a vector of length N |
name |
optional name of the stage. |
If wait_for
is "all", then subjects must wait till all subjects in the
experiment have arrived. If wait_for
is "none" then checkpoint does
nothing. If wait_for
is "ever" then subjects wait forever (or until
moved on manually by the experimenter, using next_stage
).
If wait_for
is a vector, then it is assumed to represent
subject groups. So, if wait_for
is vec
then a subject with
ID x
will wait here until all subjects with IDs
which(vec==vec[x])
have arrived at this stage.
A typical use of this might be mydf$groups[order(mydf$id),]
If all relevant subjects are ready, the subject moves on.
An object of class CheckPoint
Other stages: NEXT
, WAIT
,
stage
; form_stage
;
period
; program
;
text_stage
; timed
1 2 3 4 5 6 7 8 9 10 | expt <- experiment(N=4)
groups <- c("A", "A", "B", "B")
s1 <- text_stage(page="<html><body><form action=''>
<input type='submit' value='Next'></form></body></html>")
# wait for everyone:
add_stage(expt, period(), s1, checkpoint(), s1)
# players 1 and 2 wait for each other, so do 3 and 4:
add_stage(expt, period(), s1, checkpoint(c(1, 1, 2, 2)), s1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.