forest.plot | R Documentation |
A function for creating harmonized forest.plots via ggplot2 offering compatiability with table.plot and dot.plot.
forest.plot( parent.df, y.rank.col = "rank", Point.Est = "hr", lower.lim = "low", upper.lim = "high", y.label.rank.col = "rank", y.label.col = "subcategory", x.label = "Estimate", y.label = "Item", log.trans = TRUE, x.limits = c(0.21, 5), x.ticks = 2^(-2:2), y.limits = NULL, category.color = "category", background.palette = c("red", "blue"), category.palette = c("red", "blue"), shape.palette = c(16, 16), flip.palette = FALSE )
parent.df |
data.frame used by ggplot |
y.rank.col |
column holding ranks for line items in forest/dot/table plots |
Point.Est |
point estimate |
lower.lim |
column holding lower limit of CI |
upper.lim |
column holding upper limit of CI (forest.plot) |
y.label.rank.col |
column holding ranks for labels in forest/dot/table plots |
y.label.col |
column holding labels for forest/dot/table plots |
x.label |
value gets passed to labs |
y.label |
value gets passed to labs |
log.trans |
Logical; if TRUE log transformation is applied to x axis (ensure x.limits are positive!) (forest.plot) |
x.limits |
value gets passed to scale_x_continuous |
x.ticks |
value gets passed to scale_x_continuous |
y.limits |
passed to scale_y_continuous |
category.color |
data.frame column assocated with aes color mapping (forest.plot, line.plot, nsubj.plot, table.plot) |
background.palette |
palette gets passed to scale_fill_manual (forest.plot) |
category.palette |
colors assoicated with categorical variable |
shape.palette |
values passed to scale_shape_manual |
flip.palette |
logical; if TRUE it reverse the order of colors used for background (forest.plot) |
A ggplot object is returned.
Greg Cicconetti
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.