[R] plotting only text as a table

Thomas Lumley tlumley at u.washington.edu
Wed Jul 10 17:38:26 CEST 2002

On Wed, 10 Jul 2002, Stephan Holl wrote:

> Dear R-Gurus,
> I am preparing a multiple-plot-sheet with 2rows and 2 columns, but there
> are actually only 3 plots to plot.
> the 4. part of my sheet should contain a table with simple statistic
> values like n, mode, standard deviation....
> I cannot handle to plot the information in the plot. the summary()
> function prints it to the xtrem instead of the plot.

If you have some lines of text in variable foo you can get a reasonable
start on plotting it with

	text(0.5,0.5, paste(foo,collapse="\n"))

which will put it centered horizontally and vertically.  You will probably
then need to adjust things.

If you want the text to be the output of an R command and can't figure out
how to construct the text yourself you can capture it in a textConnection.
There is an example in help(textConnection).


r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list