View source: R/geom_pointline_sem.R
geom_pointline_sem | R Documentation |
ggplot group summary stat with line, point and error bar
geom_pointline_sem(
point = T,
point_fill = "red",
line = T,
line_color = "red",
linewidth = 1,
error = T,
errorbarwidth = 0.2,
pd = 0
)
point |
add points (TRUE/FALSE) |
point_fill |
fill color for points (default = "red") |
line |
add connecting lines (TRUE/FALSE) |
line_color |
line color (default = "red") |
linewidth |
width for line and errorbar line |
error |
add SEM bars (TRUE/FALSE) |
errorbarwidth |
width of |
pd |
amount to use for dodge (use if multiple groups/lines) |
a ggplot object
library(ggplot2)
# Tree Growth
# just summary stats
p <- ggplot(Orange, aes(x = age, y = circumference)) +
geom_pointline_sem(pd=0) +
theme_classic()
p
# add individual data
p + geom_line(aes(x = age, y = circumference, group = Tree), inherit.aes = F, color = "black", alpha =0.3)
# Indomethacin PK
p <- ggplot(Indometh, aes(x = time, y = conc)) +
geom_pointline_sem(pd=0) +
scale_y_log10()
p
p + geom_line(aes(x = time, y = conc, group = Subject), inherit.aes = F, color = "black", alpha =0.3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.