ReporteRs (version 0.5.4)

addRScript.pptx: Add R script into a pptx object

Description

Add R script into a "pptx" object.

Usage

# S3 method for pptx
addRScript(doc, file, text,
  comment.properties = textProperties(color = "#A7947D"),
  roxygencomment.properties = textProperties(color = "#5FB0B8"),
  symbol.properties = textProperties(color = "black"),
  operators.properties = textProperties(color = "black"),
  keyword.properties = textProperties(color = "#4A444D"),
  string.properties = textProperties(color = "#008B8B", font.style =
  "italic"), number.properties = textProperties(color = "blue"),
  functioncall.properties = textProperties(color = "#823C3C"),
  argument.properties = textProperties(color = "#F25774"),
  package.properties = textProperties(color = "green"),
  formalargs.properties = textProperties(color = "#424242"),
  eqformalargs.properties = textProperties(color = "#424242"),
  assignement.properties = textProperties(color = "black"),
  slot.properties = textProperties(color = "#F25774"),
  default.properties = textProperties(color = "black"),
  par.properties = parProperties(padding = 0), ...)

Arguments

doc

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

file

R script file. Not used if text is provided.

text

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

comment.properties

comment txtProperties object

roxygencomment.properties

roxygencomment txtProperties object

operators.properties

operators txtProperties object

keyword.properties

keyword txtProperties object

string.properties

string txtProperties object

number.properties

number txtProperties object

functioncall.properties

functioncall txtProperties object

argument.properties

argument txtProperties object

package.properties

package txtProperties object

formalargs.properties

formalargs txtProperties object

eqformalargs.properties

eqformalargs txtProperties object

assignement.properties

assignement txtProperties object

symbol.properties

symbol txtProperties object

slot.properties

slot txtProperties object

default.properties

default txtProperties object

par.properties

a parProperties object

...

further arguments, not used.

Value

an object of class "pptx".

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" )
doc = addRScript(doc, text = "ls()
x = rnorm(10)" )

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

Run the code above in your browser using DataCamp Workspace