-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
67 lines (52 loc) · 1.94 KB
/
README.Rmd
File metadata and controls
67 lines (52 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# mirage <img src="man/figures/logo.png" align="right" height="120" />
<!-- badges: start -->
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[](https://CRAN.R-project.org/package=mirage)
[](https://github.com/GSK-Biostatistics/mirage/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
The goal of mirage is to insert displays into 'Microsoft PowerPoint' documents at
specific locations within slides.
Users can uniquely identify both where and what to add to the PowerPoint document,
create new slides, or update old ones.
## Installation
You can install the development version of {mirage} like so:
``` r
pak::pak("GSK-Biostatistics/mirage")
```
## Example
```r
library(mirage)
# empty presentation style
pptx <- example_pptx()
# information about available placeholders from the layouts
list_placeholders(pptx, layout = "Comparison")
# adding content to new slide
pptx <- pptx |>
add_slide(
layout = "Comparison",
content("Title Text" , ph = ph_title()),
content("Some additional information", ph = ph_subtitle()),
content(list(
"Bullet 1",
list("Sub-Bullet 1","Sub-Bullet 2"),
"Bullet 2",
list("Sub-Bullet 3","Sub-Bullet 4")
), ph = ph_body_left()),
content(polish::as_file(
system.file("man/figures/logo.png", package = "mirage")
), ph = ph_body_right())
)
save_pptx(pptx, "/my/output/location/presentation.pptx")
```