Skip to content

Commit f549d19

Browse files
committed
update ppt to include figures on one slide
1 parent 7cd94c8 commit f549d19

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

Vertigo/hint.Rmd

+26-8
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ q
8181
library(INLA)
8282
library(meta4diag)
8383
res <- meta4diag(data = dat)
84+
png(file="SROC_hint.png")
8485
SROC(res, crShow = T)
86+
dev.off()
8587
8688
#sensitivity
8789
png(file="sensitivity_hint.png")
@@ -91,6 +93,7 @@ forest(res, accuracy.type="sens", est.type="mean", p.cex="scaled", p.pch=15, p.c
9193
cut=TRUE, intervals=c(0.025,0.975),
9294
main="Forest plot of Sensitivity", main.cex=1.5, axis.cex=1)
9395
dev.off()
96+
9497
png(file="specificity_hint.png")
9598
#specificity
9699
forest(res, accuracy.type="spec", est.type="mean", p.cex="scaled", p.pch=15, p.col="black",
@@ -127,18 +130,33 @@ library(flextable)
127130
128131
#initialise ppt
129132
my_pres<-read_pptx() %>%
130-
133+
add_slide(layout = "Title and Content", master = "Office Theme") %>%
134+
ph_with(value = "Vertigo Meta-analysis-Bayesian Approach", location = ph_location_type(type = "title"))%>% ph_with(value = c("Bivariate analysis","Bayesian approach appropriate for small sample size","Integrated Nested Laplacian Analysis"), location = ph_location_type(type = "body")) %>%
135+
131136
#add first slide
132137
add_slide(layout = "Title and Content", master = "Office Theme") %>%
133-
ph_with(value = "Vertigo Meta-analysis", location = ph_location_type(type = "title"))%>% ph_with(value = flextable(dat), location = ph_location_type(type = "body")) %>%
134-
135-
138+
ph_with(value = "Vertigo Meta-analysis-Bayesian Approach", location = ph_location_type(type = "title"))%>% ph_with(value = flextable(dat), location = ph_location_type(type = "body")) %>%
139+
136140
#add png to second slide
137141
add_slide(layout = "Title and Content", master = "Office Theme") %>%
138-
ph_with(value = "Vertigo Meta-analysis", location = ph_location_type(type = "title")) %>%
139-
ph_with(value = external_img("LRpos_hint.png"), location = ph_location_type(type = "body")) %>%
140-
141-
#add ggplot figure to third slide
142+
ph_with(value = "Vertigo Meta-analysis-SROC", location = ph_location_type(type = "title")) %>%
143+
ph_with(value = external_img("SROC_hint.png"), location = ph_location_type(type = "body")) %>%
144+
145+
#add png to third slide
146+
add_slide(layout = "Two Content", master = "Office Theme") %>%
147+
ph_with(value = "Sensitivity and Specificty of HINT",
148+
location=ph_location_type(type="title")) %>%
149+
ph_with(value = external_img("sensitivity_hint.png"),location = ph_location_left() ) %>%
150+
ph_with(value = external_img("specificity_hint.png"),location = ph_location_right() ) %>%
151+
152+
#add png to fourth slide
153+
add_slide(layout = "Two Content", master = "Office Theme") %>%
154+
ph_with(value = "Positive and Negative LR of HINT",
155+
location=ph_location_type(type="title")) %>%
156+
ph_with(value = external_img("LRpos_hint.png"),location = ph_location_left() ) %>%
157+
ph_with(value = external_img("LRneg_hint.png"),location = ph_location_right() ) %>%
158+
159+
#add ggplot figure to fifth slide
142160
add_slide(layout = "Title and Content", master = "Office Theme") %>%
143161
ph_with(value = "Metaregression", location =ph_location_type(type = "title")) %>%
144162
ph_with(value = p, location = ph_location_type(type = "body"))

0 commit comments

Comments
 (0)