Last data update: 2014.03.03

R: Get layout names of a pptx document
slide.layouts.pptxR Documentation

Get layout names of a pptx document

Description

Get layout names that exist into the template used when pptx has been created.

Usage

## S3 method for class 'pptx'
slide.layouts(doc, layout, ...)

Arguments

doc

Object of class pptx to extract layout names from.

layout

optional single string value, one of the layout names

...

further arguments, not used.

Details

Available names are layout names of the template document (e.g. Title and Content , Two Content, etc.). If layout is specified, the layout representation will be produced in a plot. This can be useful to check available shapes.

See Also

pptx, addSlide.pptx, slide.layouts

Examples

doc.filename = "addFlexTable_example.pptx"

options( "ReporteRs-fontsize" = 24 )
doc = pptx( title = "title" )
# get layouts names
layouts = slide.layouts(doc)
layouts
# loop over layout names to plot each slide style
for(i in layouts ){
	slide.layouts(doc, i )
	title(sub = i )
	if( interactive() ) readline(prompt = "show next slide layout")
} 

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(ReporteRs)
Loading required package: ReporteRsjars
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ReporteRs/slide.layouts.pptx.Rd_%03d_medium.png", width=480, height=480)
> ### Name: slide.layouts.pptx
> ### Title: Get layout names of a pptx document
> ### Aliases: slide.layouts.pptx
> 
> ### ** Examples
> 
> doc.filename = "addFlexTable_example.pptx"
> 
> options( "ReporteRs-fontsize" = 24 )
> doc = pptx( title = "title" )
> # get layouts names
> layouts = slide.layouts(doc)
> layouts
 [1] "Blank"                   "Title Only"             
 [3] "Title and Content"       "Section Header"         
 [5] "Title and Vertical Text" "Comparison"             
 [7] "Content with Caption"    "Title Slide"            
 [9] "Two Content"             "Vertical Title and Text"
> # loop over layout names to plot each slide style
> for(i in layouts ){
+ 	slide.layouts(doc, i )
+ 	title(sub = i )
+ #	if( interactive() ) readline(prompt = "show next slide layout")
+ } 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>