[R] packGrob and dynamic resizing

baptiste auguie baptiste.auguie at googlemail.com
Sun Sep 20 14:28:33 CEST 2009


Dear all,

I'm trying to follow an old document to use Grid frames,

Creating Tables of Text Using grid
Paul Murrell
July 9, 2003

 As a minimal example, I wrote this,

gf <- grid.frame(layout = grid.layout(1, 1), draw = TRUE)
 label1 <- textGrob("test", x = 0, just = "left", name="test")

gf=placeGrob(gf, rectGrob(), row = 1, col = 1)
gf=packGrob(gf, label1, row = 1, col = 1)
grid.draw(gf)

grid.edit("test", label = "longer text", grep=T)

I'm a bit lost here, as I was expecting the frame to be automatically
adjusted to fit the new text.

Can anyone point me in the right direction?

Best regards,

baptiste




More information about the R-help mailing list