addTable | R Documentation |
Adds a small table to a graph.
addTable(tbl, where = "ll", title = "")
tbl |
the data frame or matrix to add to graph. All data must be of mode character, which allows the user to format the data rather than the automatic formatting done by R. |
where |
character specifying the corner the table should be placed, see Details. |
title |
the title of the table. |
where
must be one of "ul," "ur," "ll," or "lr." The first letter is
an abbreviation for upper or lower, the second letter is an abbreviation for
left or right.
Nothing is returned.
Each column of the table can be formatted by the user, using the
format
function, to control the alingment of the data in each column
of the table. The column names of the table are the column names of
the matrix or data frame. If there are no column names in a matrix, then the
table is printed without column names. A matrix gives the user more control over
column names than does a data frame.
addExplanation
, addAnnotation
## Not run: set.seed(1) X <- rnorm(32) Y <- X + rnorm(32) setGD() AA.pl <- xyPlot(X, Y) Mat <- cbind(c("Mean of X", "Mean of Y"), round(c(mean(X), mean(Y)), 2)) addTable(Mat, "ul") # For more details of addTable see vignette(topic="GraphAdditions", package="smwrGraphs") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.