# NOT RUN {
library(rrtable)
library(magrittr)
library(officer)
code="summary(lm(mpg~hp+wt,data=mtcars))"
read_pptx() %>% add_text(title="Regression Analysis") %>%
add_Rcode(code) %>% print(target=paste0(tempdir(),"/","test.pptx"))
# }
Run the code above in your browser using DataLab