I have created a tableGrob T
, this tableGrob can be of an altering size, according to previously given parameters.
Is there a way to use the png()
function so that the width and height parameters will be taken from the previously created tableGrob
Lets say something like this:
library(gridExtra)
T=tableGrob(mydata)
png("myfile"
,width=convertX(grobWidth(T),"points") # pseudo-code
,height=convertX(grobHeight(T),"points"))
grid.draw(T)
dev.off
I get a message that r cannot start the png device and about 50 warnings.