Description Usage Arguments Details Value See Also Examples
View source: R/forestplot-grid.R
Draw a forest plot together with a table of text.
1 2 3 4 |
labeltext |
Matrix of strings or |
mean |
Vector of centers of confidence intervals (or |
lower |
Vector of lower ends of confidence intervals |
upper |
Vector of upper ends of confidence intervals |
align |
Vector giving alignment ( |
is.summary |
Vector of logicals. Summary lines have bold text and diamond confidence intervals. |
clip |
Lower and upper limits for clipping confidence intervals to arrows |
xlab |
x-axis label |
zero |
x-axis coordinate for zero line |
graphwidth |
Width of confidence interval graph |
col |
See |
xlog |
If |
xticks |
Optional user-specified x-axis tick marks. Specify |
boxsize |
Override the default box size based on precision |
... |
Not used. |
This function is more flexible than metaplot
and the
plot
methods for meta-analysis objects, but requires more work by
the user.
In particular, it allows for a table of text, and clips confidence intervals to arrows when they exceed specified limits.
None
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | data(cochrane)
steroid <- meta.MH(n.trt, n.ctrl, ev.trt, ev.ctrl,
names=name, data=cochrane)
tabletext<-cbind(c("","Study",steroid$names,NA,"Summary"),
c("Deaths","(steroid)",cochrane$ev.trt,NA,NA),
c("Deaths","(placebo)", cochrane$ev.ctrl, NA,NA),
c("","OR",format(exp(steroid$logOR),digits=2),NA,format(exp(steroid$logMH),digits=2))
)
m<- c(NA,NA,steroid$logOR,NA,steroid$logMH)
l<- m-c(NA,NA,steroid$selogOR,NA,steroid$selogMH)*2
u<- m+c(NA,NA,steroid$selogOR,NA,steroid$selogMH)*2
forestplot(tabletext,m,l,u,zero=0,
is.summary=c(TRUE,TRUE,rep(FALSE,8),TRUE),
clip=c(log(0.1),log(2.5)), xlog=TRUE,
col=meta.colors(box="royalblue",
line="darkblue", summary="royalblue"))
forestplot(tabletext,m,l,u,zero=0,
is.summary=c(TRUE,TRUE,rep(FALSE,8),TRUE),
clip=c(log(0.1),log(2.5)), xlog=TRUE, boxsize=0.75,
col=meta.colors(box="royalblue",line="darkblue",
summary="royalblue"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.