add_Rcode | R Documentation |
Make a R code slide into a document object
add_Rcode(mydoc, code, format = "pptx")
mydoc |
A document object |
code |
A character string encoding R codes |
format |
desired format. choices are "pptx" or "docx" |
a document object
library(rrtable) library(magrittr) library(officer) code="summary(lm(mpg~hp+wt,data=mtcars))" read_pptx() %>% add_text(title="Regression Analysis") %>% add_Rcode(code)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.