record | R Documentation |
Record an asciinema screencast
record(
script,
typing_speed = NULL,
empty_wait = NULL,
cols = NULL,
rows = NULL,
title = NULL,
timestamp = NULL,
env = NULL,
idle_time_limit = NULL,
timeout = NULL,
start_wait = NULL,
end_wait = NULL,
record_env = NULL,
startup = NULL,
echo = TRUE,
speed = NULL,
process = NULL,
interactive = TRUE,
locales = get_locales(),
options = asciicast_options(),
incomplete_error = NULL,
show_output = FALSE
)
script |
Path of an R script to record. It can also be a readable
R connection or URL, as it is passed to |
typing_speed |
Average typing speed, per keypress, in seconds. |
empty_wait |
How long to wait for empty lines in the script file, in seconds. |
cols |
Width of the terminal, in number of characters. |
rows |
Height of the terminal, in number of characters. If it the
string |
title |
Title of the cast, this is included in the cast JSON file. |
timestamp |
Time stamp of the recording, defaults to |
env |
Environment variables to include in the case JSON file.
Defaults to |
idle_time_limit |
Time limit for the cast not printing anything, in seconds. By default there is no limit. |
timeout |
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. |
start_wait |
Delay at the beginning, in seconds. |
end_wait |
Delay at the very end, in seconds. |
record_env |
Environment variables to set for the R subprocess. |
startup |
Quoted language object to run in the subprocess before starting the recording. |
echo |
Whether to echo the input to the terminal. If |
speed |
Rescale the speed of the recorded cast with this factor. The delay of the first frame is kept constant. |
process |
A processx subprocess to run the cast in. By default a
new subprocess is started. You can reuse a process by calling
|
interactive |
Whether to run R in interactive mode. This argument
is ignored if |
locales |
Locales to set in the asciicast subprocess. Defaults
to the current locales in the main R process. Specify a named character
vector here to override some of the defaults. See also |
options |
Options to set in the subprocess, a named list.
They are deparsed to code, and then the code setting them is
executed in the subprocess. See |
incomplete_error |
Whether to error on incomplete expressions.
You might need to set this to |
show_output |
Whether to show the output of the subprocess in real time. |
An asciicast
object, write this to
file with write_json()
.
Other asciicast functions:
asciicast-package
,
asciicast_start_process()
,
read_cast()
,
write_json()
script <- system.file("examples", "hello.R", package = "asciicast")
cast <- record(script)
play(cast)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.