This is an utility function to output a decorated grob (gTree
) object
Arguments
- grobs
a grid grob (
gTree
) object, optionallyNULL
if only a grob with the decoration should be shown.- outpath
specify full path to output pdf to
BCE
orBEE
- pagesize
name of
pagesize
(print size) and orientation, accepted values include"a4.landscape"
,"a4.portrait"
,"letter.portrait"
and"letter.landscape"
(default)
Author
Chendi Liao (liaoc10) chendi.liao@roche.com
Examples
if (FALSE) {
library(ggplot2)
g <- with(iris, {
list(
ggplotGrob(qplot(Sepal.Length, Sepal.Width, col = Species)),
ggplotGrob(qplot(Sepal.Length, Petal.Length, col = Species)),
ggplotGrob(qplot(Sepal.Length, Petal.Width, col = Species))
)
})
# output to pdf
g %>% as_pdf("~/example_aspdf1.pdf")
}