[R] display matrix on graphics device

Jim Lemon jim at bitwrit.com.au
Tue Dec 9 13:03:32 CET 2008


murali.menon at fortisinvestments.com wrote:
> Folks,
>
> Is there a way to print a matrix in tabular form onto the graphics device? 
> I want to create a display consisting of graphs and tables,
> so that I can do something like:
>
> windows()
> opar = par(mfrow = c(3, 2))
>
> library(plotrix)
> library(PerformanceAnalytics)
>
> radial.plot(...)
> radial.plot(...)
> chart.BarVaR(...)
> chart.RollingCorrelation(...)
>
> print.matrix.onto.graphics.device(X)
>
> par(opar)
>
> where X is a matrix with named rows and columns.
>
> If this is not easily done, is there any way I can embed graphics and 
> tabular data into a PDF?
>
>   
Hi Murali,
As you are using the plotrix package, will addtable2plot do what you want?

Jim



More information about the R-help mailing list