Description Usage Arguments Details See Also Examples
replay
plays back an experiment using records stored on disk.
All requests from clients, and all commands issued on the command line,
will be replayed. Afterwards the experiment can be continued.
1 2 |
experiment |
an object of class Experiment |
folder |
which record to use. Default is the current session or the most recent session found |
maxtime |
replay only 'maxtime' seconds of the original session |
speed |
how long to wait between each command or request |
ask |
ask before replaying each command or request |
live |
run the replay "live", with the web server continuing to serve |
clients |
(character vector) only replay requests from |
betr records requests and commands in a folder named <experiment
name>-YYYY-MM-DD-HHMMSS, where the date and time record when
ready
was called. Within this folder, the subfolder 'record'
holds details. If folder
is not given, the default is either the
current session name, or the most recently accessed folder matching the
format above.
Each file in the folder records a single command or request. The filename records the time after experiment start that the command/request was processed. Details are stored in the file using the YAML format, which is quite self-explanatory and easy to edit.
Unless live=TRUE
, the experiment will be stopped before replay(if it is already started). In any case, the
subject table will be reinitialized and ready
will be called.
This has the effect of calling any user-defined on_ready
function.
speed
can be numeric or "realtime". A numeric gives the number of
seconds to wait before executing each command or request. "realtime" means,
go at the speed of the original session. live=TRUE
implies
speed="realtime"
unless speed
is explicitly set.
If maxtime
is given, only the first maxtime
seconds of the experiment will be replayed.
This is useful if you want to "rewind" the experiment because of lab problems,
or during debugging.
If ask
is TRUE
then the experimenter will be prompted before each
command or request is replayed:
enter or 'n' replays the command/request
'c' continues replaying to the end, without prompting again
's' skips the command/request
'q' skips this and all other commands/requests
'd' shows details of the command/request
'?' or 'h' shows a help message
Any other item will be evaluated in the global environment
Note that replay creates a new session. This means that you cannot do
replay(expt, maxtime=30)
replay(expt, maxtime=120)
: the first replay will have created a new session with only the commands
from the first 30 seconds. If you want to move backward and forward
within a session, use replay(expt, folder="xxx")
where xxx is the specific
session of interest.
Other command line functions: get_url
,
info
, map
,
nperiods
,
print,Experiment,ANY-method
,
print,Experiment-method
,
print_stages
, session_name
;
halt
; load_commands
;
merge_subjects
; next_stage
;
pause
; ready
;
restart
; start.Experiment
;
trace_stage
, untrace_stage
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.