-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsimple_slide1.R
43 lines (25 loc) · 1.71 KB
/
simple_slide1.R
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
Sys.setenv(https_proxy = "https://158.119.150.18:8080")
Sys.setenv(http_proxy = "http://158.119.150.18:8080")
library(R2PPT)
library(RDCOMClient)
library(fingertipsR)
library(dplyr)
library(ggplot2)
library(stringr)
library(forcats)
## Initialise
my.slides<- PPT.Init(method="RDCOMClient")
##==========================================================================================================
## Title slide
title <- "title: replace text"
subtitle <- "subtitle: replace text"
my.slides <- PPT.AddTitleSlide(my.slides,title="Automated ppt from R",
subtitle="...using the Fingertips API")
title <- "The `fingertipsR` package"
text <- "5 functions \rprofiles() - extracts profile names and ids \rindicators() - extracts indicator names and ids\rindicator_metadata() - extracts relevant metadata\rfingertips_data() - extracts the data\rdeprivation_decile()"
my.slides <- PPT.AddTextSlide(my.slides, title = title, text = text)
title <- "The `fingertipsR` package"
text <- "5 functions \rprofiles() - extracts profile names and ids \rindicators() - extracts indicator names and ids\rindicator_metadata() - extracts relevant metadata\rfingertips_data() - extracts the data\rdeprivation_decile()"
my.slides <- PPT.AddTextSlide(my.slides, title = "Extract prevalence data", text = "profiles <- profiles() %>% filter(stringr::str_detect(ProfileName, 'prevalence')) ## identifies prevalence profile\rprevalence <- fingertips_data(ProfileID = 37, DomainID = 1938133099) # download data\reven more text")
my.slides <-PPT.ApplyTemplate(my.slides, file = "C:/Users/julian.flowers/Documents/Presentation-standard.potx")
PPT.SaveAs(my.slides,file="test_slides1.pptx")