A search of the R-help archives may provide some help. See, for example, http://r.789695.n4.nabble.com/including-tabular-information-with-a-plot-in-R-Graphics-tt885431.html
Jean `·.,, ><(((º> `·.,, ><(((º> `·.,, ><(((º> Jean V. Adams Statistician U.S. Geological Survey Great Lakes Science Center 223 East Steinfest Road Antigo, WI 54409 USA From: Aram Fingal <fin...@multifactorial.com> To: r-help@r-project.org Date: 08/05/2011 12:40 PM Subject: [R] Displaying a summary in graphics Sent by: r-help-boun...@r-project.org I'm writing a script which puts together a bunch of graphs and outputs them to a graphics device. One of the things I want to add is ANOVA summaries but I'm having trouble with formatting them for graphics. I do this: anova_summary <- summary(aov(concentration~inhibition*genotype, data =drug_data)) print(anova_summary) The printout to the R console is in the format I want but if I do this: mtext(side=1, outer=TRUE, text=anova_summary, cex=0.75, line=1, adj=0) I don't get the proper formatting. I gather, from the documentation and searching the web, that the issue is that summary() includes a method for print() to format the data but mtext() doesn't follow the method. If I understand correctly, I need to use something like format() or encodeString() to get the proper formatting for mtext() to use. The thing is that I haven't figured out anything close to the right parameters to use. Is there some place which describes how to do this? ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.