Is there a way to use gplots :: textplot with tables :: tableular?
I would like to print a nice formatted table on a graphics device. I know there is textplot()
, but doesn't seem to support a feature tabular()
from the package tables
I'm using to build my table.
Is there a workaround, maybe another couple of functions that can help me here?
EDIT: Here's an example of what I'm trying to do:
dat <- data.frame(
id=paste("id", 1:10),
loc=sample(c("north", "south"), 10, replace=TRUE),
val1=rnorm(10),
val2=rnorm(10)
)
tab <- tabular(id + 1 ~ (val1 + val2)*loc*sum, data=dat)
#textplot(tab) # won't do it
(the call for tables will get more complicated, I am currently studying it step by step ...)
Any hint is appreciated! Now I'm thinking about using it text
with monospaced fonts, but maybe something better?
EDIT2: Here is the accepted solution:
textplot(capture.output(tab))
+3
source to share
3 answers