
Last chance! 50% off unlimited learning
Sale ends in
# NOT RUN {
#START_TAG_TEST
# Create a new document
doc <- pptx( )
# Add a slide
doc = addSlide( doc, slide.layout = "Title and Content" )
# Add "Hello World" into the document doc
doc <- addParagraph(doc, "Hello Word!" )
# Add a slide
doc = addSlide( doc, slide.layout = "Title and Content" )
# Add into the document : "My tailor is rich" and "Cats and Dogs"
# format some of the pieces of text
pot1 = pot("My tailor", textProperties(color="red") ) + " is " + pot("rich"
, textProperties(font.weight="bold") )
pot2 = pot("Cats", textProperties(color="red") ) + " and " + pot("Dogs"
, textProperties(color="blue") )
my.pars = set_of_paragraphs( pot1, pot2 )
doc <- addParagraph(doc, my.pars )
writeDoc( doc, "addParagraph_example.pptx")
#STOP_TAG_TEST
# }
Run the code above in your browser using DataLab