[R-meta] Coupled Forest Plot
James Meyer
EBMvet @end|ng |rom out|ook@com
Tue Jul 21 23:49:12 CEST 2020
I am trying to produce a coupled forest plot of sensitivity and specificity (generated by metaprop) for a diagnostic test. I produce one plot for each sensitivity and specificity and then couple by study. Using the following code I still get a small white space between the two plots. What is the best way to eliminate a vertical space between two plots?
> grid.grabExpr(
forest(sensA,leftlabs = c("Study","TP","n1"),rightlabs=c("Sensitivity","95%CI"),xlim=c(0,1),sortvar=sensitivity, col.square="black",
comb.fixed=FALSE,comb.random=FALSE,overall=FALSE,xlab="Sensitivity"),
height = 0.5, width = 3
) -> fp1
grid.grabExpr(
forest(
specA,studlab=FALSE,leftlabs=c("TN","n2"),leftcols=c("event","n"),sortvar = sensitivity,col.square="black",
rightlabs=c("Specificity","95%CI"),
xlim=c(min=0,max=1),
comb.fixed=FALSE,comb.random=FALSE,overall=FALSE,xlab="Specificity"),
height = 0.5, width = 3
) -> fp2
grid.arrange(fp1, fp2, ncol = 2, vp=viewport(width=1, height=1))
thank you
James Meyer
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
[[alternative HTML version deleted]]
More information about the R-sig-meta-analysis
mailing list