turtle_do | R Documentation |
turtle_do
evaluates an R expression
with the Turtle temporarily hidden (for performance reasons).
turtle_do(expr)
expr |
expression to evaluate |
The terrarium must be initialized prior to using
these functions, see turtle_init
.
In order to decrease the evaluation time of expr
,
it is evaluated with Turtle temporarily hidden.
Basically it means that if a Turtle image is visible (see
turtle_show
and turtle_hide
) turtle_do
removes it, evaluates expr
and redraws it on the function exit.
Other TurtleGraphics: TurtleGraphics-package
,
turtle_getpos
, turtle_goto
,
turtle_init
, turtle_move
,
turtle_param
, turtle_reset
,
turtle_show
, turtle_status
,
turtle_turn
, turtle_up
turtle_init() turtle_do({ for (i in 1:4) { turtle_forward(50) turtle_right(90) } })
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.