Description Usage Arguments Value Examples
Add two plots into a document object
1 2 3 4 5 6 7 8 9 10 11 |
mydoc |
A document object |
plotstring1 |
An R code string encoding the first plot |
plotstring2 |
An R code string encoding the second plot |
preprocessing |
preprocessing |
plottype |
character One of c("auto","plot","ggplot") |
width |
plot width in inches |
height |
plot height in inches |
echo |
logical Whether or not show R code |
top |
top plot position in inches |
a document object
1 2 3 4 5 6 7 | require(magrittr)
require(officer)
require(ggplot2)
plotstring1="plot(iris)"
plotstring2="ggplot(iris,aes(x=Sepal.Length,y=Sepal.Width))+geom_point()"
read_pptx() %>% add_text(title="Two plots") %>% add_2plots(plotstring1,plotstring2)
read_docx() %>% add_text(title="Two plots") %>% add_2plots(plotstring1,plotstring2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.