View source: R/slidedeck_classes.R
IQSlidedeck | R Documentation |
Reads all rds files and generates a slide deck from the input
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
)
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 |
rdspath |
character or |
template |
character or |
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. |
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.
Daniel Kaschek, IntiQuan
Other Slidedeck functions:
IQRoutputPPTX()
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.