View source: R/geom_meta_diamond.R
geom_meta_diamond_h | R Documentation |
geom_meta_diamond_h
creates a horizontal meta-analytic diamond
defined by an x
value (horizontal center of diamond), xmin
and xmax
values (for the horizontal ends of the diamond), a y
value (for the
vertical placement of the diamond) and a height
(for the vertical height
of the diamond). Note the use of xmin
and xmax
allows for representation
of asymmetric confidence intervals with this geom.
geom_meta_diamond_h(
mapping = NULL,
data = NULL,
stat = "identity",
position = "identity",
...,
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE
)
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
stat |
The statistical transformation to use on the data for this layer.
When using a
|
position |
A position adjustment to use on the data for this layer. This
can be used in various ways, including to prevent overplotting and
improving the display. The
|
... |
Other arguments passed to the geom. These are often aesthetics,
used to set an aesthetic to a fixed value, like ##Aesthetics ##
|
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
# example code
library(ggplot2)
my_effects <- data.frame(
effect_size = c(1, 2, 1, 0),
UL = c(2, 3, 2, 1),
LL = c(0, 1, 0, -1),
y = c(1, 2, 3, 4)
)
myplot <- ggplot2::ggplot()
myplot <- myplot + geom_meta_diamond_h(
data = my_effects,
ggplot2::aes(
x = effect_size,
xmin = LL,
xmax = UL,
y = y
),
height = 0.25,
color = "black",
fill = "red",
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.