add_ggplot | R Documentation |
Add ggplot into a document object
add_ggplot(mydoc, code = "", top = 2)
mydoc |
A document object |
code |
R code for table |
top |
top position of plot |
a document object
require(rrtable) require(ggplot2) require(officer) require(magrittr) code <- "ggplot(mtcars, aes(x = mpg , y = wt)) + geom_point()" read_pptx() %>% add_text(title="ggplot") %>% add_ggplot(code=code) read_docx() %>% add_text(title="ggplot") %>% add_ggplot(code=code)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.