IQSlidedeck: Build a slide deck from a slide folder

View source: R/slidedeck_classes.R

IQSlidedeckR Documentation

Build a slide deck from a slide folder

Description

Reads all rds files and generates a slide deck from the input

Usage

IQSlidedeck(
  title = NULL,
  subtitle = NULL,
  affiliation = NULL,
  date = NULL,
  filename = "slides.pptx",
  section = NULL,
  rdspath = NULL,
  template = NULL,
  titlelayout = c("Title Slide", "Title Slide white"),
  QCed = FALSE
)

Arguments

title

character or NULL (default), title of the slide deck.

subtitle

character or NULL (default), subtitle of the slide deck.

affiliation

character or NULL (default), author name and company.

date

character or NULL (default), date.

filename

character, output file name of the slide deck. If a single file name, the output is generated in rdspath. If the filename contains path information, the file will be generated in the exact filename location.

section

character or NULL (default), allows to create slides for a specific section only.

rdspath

character or NULL (default), path to the slide files. Searches for slides in getOption("IQSlide.outputfolder") if NULL.

template

character or NULL (default), path to the template PPTX file. Uses the internal template if NULL.

titlelayout

character ("Title Slide" by default), indicates which layout should be used as the title layout. Some templates have more than one option (e.g. IQNew supports "Title Slide" in blue and "Title Slide white" in white).

QCed

logical (FALSE by default). If FALSE, a note "non-QCed" is added to the title slide. If supported by the template, a particular title layout with a non-QCed mark will be used. If not supported by the template, the note "non-QCed" will be added to the subtitle.

Details

If non of the title-relevant arguments are supplied, a slide deck without title page is produced.

The appearance of the slides can be changed by setting the corresponding options via The R options() interface:

  • Select a template via options(IQSlide.template = "TemplateName"). Currently supported are "Default", "IQ", and "IQNew".

  • Select the aspect ratio via options(IQSlide.ratio = "Ratio"). Currently supported are "16:9" and "4:3" (4:3 not for IQNew). To change your settings permanently, please include your preferred options in your RProfile file.

Author(s)

Daniel Kaschek, IntiQuan

See Also

Other Slidedeck functions: IQRoutputPPTX()

Examples

## Not run: 


library(IQRtools)
library(ggplot2)
library(flextable)
setwd(tempdir())

# For compliance information in the footer of the slides
IQRinitCompliance("IQSlidedeck.R")

# ------------------------------------------------------
# Slide 1: Create a plot and a bullet point list
# ------------------------------------------------------

p1 <- IQRggplot(cars, aes(x = speed, y = dist)) + geom_point()
caption(p1) <- "Source: Ezekiel, M. (1930) Methods of Correlation Analysis. Wiley."

IQRoutputPPTX(
  c("Cars data set from R datasets",
    "The data vie the speed of cars and distances taken to stop shown as plot"),
  p1,
  section = "Slides with plots",
  title = "Overview of cars distance vs time to stop",
  filename = "carsPlot"
)


# ------------------------------------------------------
# Slide 2: Create a table and a bullet point list
# ------------------------------------------------------

IQRoutputPPTX(
  info = c("Cars data set from R datasets",
           "The data vie the speed of cars and distances taken to stop"),
  table = IQ_table(cars[1:16,]),
  section = "Slides with tables",
  title = "Overview of cars distance vs time to stop shown as table",
  filename = "carsTable"
)

# ------------------------------------------------------
# Slide 3: Create a table and a formatted bullet point list
# ------------------------------------------------------

IQRoutputPPTX(
  IQ_bullet_list(
    "* Bullet point with **bold** and *italic*" ,
    "* Another bullet point",
    "  * Indented by two spaces",
    "  * Another one",
    "* And back to ***really* outer** level",
    "* Some sort of formula `E_rel_ = m\\*c^2^`"
  ),
  IQ_table(
    cars[1:16,]
  ),
  section = "Slides with tables",
  title = "Overview of cars distance vs time to stop shown as table",
  filename = "carsTable2"
)



# ------------------------------------------------------
# Finally: Create
# ------------------------------------------------------
# Copy-paste the filename shown in R console
# to explorer to open the file

# All slides
IQSlidedeck(
  title = "My first slidedeck with IQSlides",
  subtitle = "Cars and the time they take to stop",
  affiliation = "Daniel Kaschek, IntiQuan",
  date = "2019-11-20"
)


# Just section slides
IQSlidedeck(section = "Slides with plots")


## End(Not run)

IntiQuan/IQSlides documentation built on Jan. 26, 2024, 1 p.m.