I have a small routine that organizes ggplot and grid graphics using the grid.arrange function in gridExtras packages. I need to infer from my routine (which nominally prints using grid.draw or returns a mesh object as an option) in my Sweave documentation. I don’t understand how to do this, because, say, I use "print", it doesn’t work like with ggplot clean graphics. I tried:
g <- ggkm(survfit.object, returns=T)
print(g)
where g is the object created by grid.arrange and has a class
> class(g)
[1] "frame" "gTree" "grob" "gDesc"
Any help would be appreciated
Abhijit
source
share