ReporteRs (version 0.5.8)

addRScript.pptx: Add R script into a pptx object

Description

Add R script into a "pptx" object.

Usage

# S3 method for pptx
addRScript(doc, rscript, file, text, ...)

Arguments

doc

Object of class "pptx" where expressions have to be added

file

R script file. Not used if text or rscript is provided.

text

character vector. The text to parse. Not used if file or rscript is provided.

rscript

an object of class RScript. Not used if file or text is provided.

...

further arguments, not used.

Value

an object of class "pptx".

Details

You have to one of the following argument: file or text or rscript.

See Also

pptx, addRScript

Examples

Run this code
# NOT RUN {
#START_TAG_TEST
doc.filename = "addRScript_example.pptx"
# Create a new document
doc = pptx( title = "title" )
doc = addSlide( doc, slide.layout = "Title and Content" )
an_rscript = RScript( text = "ls()
x = rnorm(10)", par.properties = parProperties() )
doc = addRScript(doc, an_rscript )

# Write the object
writeDoc( doc, file = doc.filename )
#STOP_TAG_TEST
# }

Run the code above in your browser using DataLab