# NOT RUN {
# docx example -----------
doc.filename = "ex_rscript.docx"
doc <- docx()
doc <- addRScript(doc, text = "x = rnorm(100)" )
writeDoc( doc, file = doc.filename )
# }
# NOT RUN {
# pptx example -----------
doc.filename = "ex_rscript.pptx"
doc <- pptx()
doc <- addSlide(doc, "Title and Content")
doc <- addRScript(doc, text = "x = rnorm(100)" )
writeDoc( doc, file = doc.filename )
# }
Run the code above in your browser using DataLab