Fun question.
Here is one solution that has come to mind:

# graphics output test
a <- c(1,3,2,1,4)
b <- c(2,1,1,1,2)
c <- c(4,7,2,4,5)
d <- rnorm(500)
e <- rnorm(600)
op <- par(mfrow=c(2,2))
pie(a)
pie(b)
pie(c)

txt <- capture.output(ks.test(d,e))
txt <- txt[txt != ""]
txt <- paste(txt, collapse = " \n ")

plot(1:20, col = "white", axes = F, xlab = "", ylab = "")
text(10,10, txt)



----------------Contact
Details:-------------------------------------------------------
Contact me: Tal.Galili@gmail.com |  972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
----------------------------------------------------------------------------------------------




On Thu, Aug 5, 2010 at 1:02 AM, Ralf B <ralf.bierig@gmail.com> wrote:

> Hi R Users,
>
> I need to produce a simple report consisting of some graphs and a
> statistic. Here simplification of it:
>
> # graphics output test
> a <- c(1,3,2,1,4)
> b <- c(2,1,1,1,2)
> c <- c(4,7,2,4,5)
> d <- rnorm(500)
> e <- rnorm(600)
> op <- par(mfrow=c(3,2))
> pie(a)
> pie(b)
> pie(c)
> text(ks.test(d,e))
>
> obviously, the ks.test does not make it to the output. How can this be
> archived by a) simply dumpting the text into the fourth quad so that
> coordination is relative to the quarter? b) the output is actually
> presented as a little table without the need to use a LaTeX solution?
>
> Thanks a lot,
> Ralf
>
> ______________________________________________
> 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]]

