[R-meta] Package "Meta" - Title for forestplots

Michael Dewey ||@t@ @end|ng |rom dewey@myzen@co@uk
Fri Aug 26 10:44:56 CEST 2022


Dear Tobias

I am not an expert on meta at all but I notice that forest() has as its 
last parameter the ellipsis (...) which passes further graphic 
parameters. It seems to be built on grid graphics which I do not use 
either but perhaps if you add as the last parameter in your call 
something like

main = "Tobias Saueressig's marvellous title"
or
title = "Tobias Saueressig's marvellous title"

it might work. It will not break anything so seems a lost cost experiment.

Michael

On 25/08/2022 16:08, Tobias Saueressig wrote:
> Dear All,
> here is my reproducible example:
> library(meta,tidyverse)
> 
> dat <- structure(list(studlab = c("Dubois 2015", "Fuller 2017a", 
> "Malisoux 2016a (1)","Marshall 2013", "Ryan 2014 (2)", "Dubois 2015", 
> "Malisoux 2016b", "Ryan 2011", "Malisoux 2020", "Theisen 2014", "Ryan 
> 2011", "Ryan 2011"),
>                        event.e = c(3, 11, 38, 1, 4, 8, 33, 13, 54, 37, 
> 5, 13),
>                        n.e = c(12,30, 176, 14, 32, 12, 187, 24, 428, 
> 134, 32, 24),
>                        event.c = c(3,16, 98, 1, 19, 11, 60, 8, 74, 32, 
> 8, 5), n.c = c(12, 31, 377,15, 67, 12, 185, 25, 420, 113, 25, 32),
>                        Comparison = 
> c("Neutral_cushioned_vs_minimalist","Neutral_cushioned_vs_minimalist", 
> "Neutral_cushioned_vs_minimalist","Neutral_cushioned_vs_minimalist",
>                                      
>   "Neutral_cushioned_vs_minimalist","Neutral_cushioned_vs_minimalist", 
> "Motion_control_vs_neutral",
>                                       "Motion_control_vs_neutral", 
> "Soft_midsole_vs_hard_midsole","Soft_midsole_vs_hard_midsole", 
> "Stability_vs_neutral", "Motion_control_vs_stability"),
> Outcome = c("Number of runners injured", "Number of runners 
> injured","Number of runners injured", "Number of runners injured",
>              "Number of runners injured","Running shoe satisfaction", 
> "Number of runners injured", "Number of runners injured",
> "Number of runners injured", "Number of runners injured", "Number of 
> runners injured","Number of runners injured"), id = c(1, 1, 1, 1, 1, 2, 
> 3, 3,4, 4, 5, 6)), class = c("tbl_df", "tbl", "data.frame"), row.names = 
> c(NA, -12L))
> #nest the list to be able to calculate all meta-analyses at once and 
> plot them at once as a forest plot
> dat_list <- dat %>% group_by(id) %>% 
> nest(data=c(studlab,event.e,n.e,event.c,n.c,Comparison))
> #calculate all pairwise meta-analyses
> dat_list <- map(dat_list$data,~{meta::metabin(event.e = event.e,
>                                                n.e = n.e,
>                                                event.c = event.c,
>                                                n.c = n.c,
>                                                studlab = studlab,
>                                                data=.x,
>                                                sm = "RR",
>                                                fixed = FALSE,
>                                                random = TRUE,
>                                                method.tau ="DL")})
> 
> #plot all forest plots after another and save them as pdfs
> pdf("all_forestplots.pdf",width = 10, height = 7)
> map(dat_list,~{meta::forest(.x,label.right = "Favours Group 
> 2",label.left = "Favours Group 1",text.addline2= 
> .x[["data"]][["Comparison"]])})
> dev.off()
> My question is: "How can I insert a title to this?" At the moment I am 
> using the "text.addline2" argument. But this is a bit unsatisfactory. To 
> my knowledge "meta::forest" does not have a title argument.
> is there another option to do this?
> Thanks in advance.
> Regards,
> Tobias Saueressig
> Physio Meets Science GmbH
> Wuppertal, Germany
> 
> width= 
> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> 
> Virus-free.www.avg.com 
> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
> 
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> 
> _______________________________________________
> R-sig-meta-analysis mailing list @ R-sig-meta-analysis using r-project.org
> To manage your subscription to this mailing list, go to:
> https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis
> 

-- 
Michael
http://www.dewey.myzen.co.uk/home.html



More information about the R-sig-meta-analysis mailing list