Description Usage Arguments Value Author(s) Examples
Visualising R syntax through graphics
Draw a graphical representation of the evaluation of an R expression.
1 2 | drawExpression(expr, draw.index = FALSE, draw.names = FALSE,
filename = NULL)
|
expr |
A character vector containing an R expression to be drawn; cannot contain affectation. |
draw.index |
Should index (for R objects such as vector, matrix or list) be drawn on the margin of graphics? |
draw.names |
Should names (if any) be drawn on the margin of objects? |
filename |
The name of a PDF file where the plot will be saved |
nothing
Sylvain Loiseau <sylvain.loiseau@univ-paris13.fr>
1 2 3 4 5 6 7 8 | drawExpression("1:4");
drawExpression("matrix(1:4, 2)");
drawExpression("list(1:4, matrix(1:4, 2), 2, 3, 4)");
drawExpression("c(1, 2, 3:5) > 2");
x <- 1:4
drawExpression("x");
drawExpression("sum(x)");
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.