| add_2ggplots | R Documentation | 
Add two ggplots into a document object
add_2ggplots(mydoc, plot1, plot2, width = 3, height = 2.5, top = 2)
| mydoc | A document object | 
| plot1 | An R code encoding the first ggplot | 
| plot2 | An R code encoding the second ggplot | 
| width | plot width in inches | 
| height | plot height in inches | 
| top | top plot position in inches | 
a document object
## Not run: require(ggplot2) require(magrittr) require(officer) require(rvg) plot1 <- "ggplot(data = iris, aes(Sepal.Length, Petal.Length)) + geom_point()" plot2 <- "ggplot(data = iris, aes(Sepal.Length, Petal.Length, color = Species)) + geom_point()" read_pptx() %>% add_text(title="Two ggplots") %>% add_2ggplots(plot1=plot1,plot2=plot2) read_docx() %>% add_text(title="Two ggplots") %>% add_2ggplots(plot1=plot1,plot2=plot2) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.