
This is for expert use, if you want to run multiple recordings in the same process.
asciicast_start_process(
timeout = 10,
allow_errors = TRUE,
startup = NULL,
record_env = NULL,
echo = TRUE
)
Idle timeout, in seconds If the R subprocess running the recording does not answer within this limit, it is killed and the recording stops. Update this for slow running code, that produces no output as it runs.
Whether to cast errors properly. If this is set to
TRUE
, then asciicast overwrites the "error"
option. Only change
this if you know what you are doing.
Quoted language object to run in the subprocess before starting the recording.
Environment variables to set for the R subprocess.
Whether to echo the input to the terminal. If FALSE
, then
only the output is shown.
The R process, a processx::process object.
Other asciicast functions:
asciicast-package
,
read_cast()
,
record()
,
write_json()
# NOT RUN {
# Use the same R process to record multiple casts
process <- asciicast_start_process()
script1 <- "a <- runif(10)\n"
script2 <- "a\n"
cast1 <- record(textConnection(script1), process = process)
cast2 <- record(textConnection(script2), process = process)
cast1
cast2
# }
Run the code above in your browser using DataLab