drawExpression: drawExpression

Description Usage Arguments Value Author(s) Examples

Description

Visualising R syntax through graphics

Draw a graphical representation of the evaluation of an R expression.

Usage

1
2
drawExpression(expr, draw.index = FALSE, draw.names = FALSE,
  filename = NULL)

Arguments

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

Value

nothing

Author(s)

Sylvain Loiseau <sylvain.loiseau@univ-paris13.fr>

Examples

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)");

sylvainloiseau/drawExpression documentation built on May 3, 2019, 9:39 p.m.