Skip to content

plotting text from formatted object

2 messages · Joel Allen, Thomas Lumley

#
Dear List,
I would like to plot the diagnostic plots for an anova
object and the anova table in a single window divided
into 5 plotting regions.  Plotting the diagnostics is
simple engough but is there an easy way to plot the
formatted table of an anova object in the fifth plotting
region?  I am using v1.2.1 on RH7.  The code I am using
follows:

...
aov.objects <-
objects()[grep('*.aov',objects())]#collect all aov
objects
x11(width=8.5,height=11)#set graphics window
layout(matrix(c(1,2,3,4,5,5), 3, 2,T))#create layout
for(x in aov.objects)
  {
    plot(get(x))#plot aov object
    mtext(paste("Diagnostics for
",x,sep=""),side=3,line=-2,outer=T)#add title
    
plot(10,10,type='n',bty='n',axes=F,xlab='',ylab='')#set
dummy plot
    text(1,14,anova(get(x)),pos=4)#attempt to plot
formatted output fails
  }
...

Any suggestions would be appreciated.

Thanks

Joel Allen
Institute of Applied Sciences
University of North Texas
hjallen at unt.edu
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Wed, 9 May 2001, Joel Allen wrote:

            
You can use a text connection to capture the output of a print command to
a vector of strings (see the example in help(textConnection)) then use
text() to write these strings.

	-thomas

Thomas Lumley			Asst. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._