msdplot | R Documentation |
Function to plot means and confidence limits.
msdplot(
trait,
groups,
dfr,
conf = 0.95,
dotplot = TRUE,
sort.means = c("none", "increasing", "decreasing"),
main.title = NULL,
color = c("orange", "orange", "black"),
x.las = 1,
jf = 0.1,
hsep = 0.1,
...
)
trait |
The name of the column for the trait to plot. |
groups |
The name of the column for the grouping factor. |
dfr |
The name of the data frame. |
conf |
Probability for the confidence limits or number of standard deviations. |
dotplot |
Logical. If |
sort.means |
Sort for means. Options are |
main.title |
Main title. |
color |
Color for mean symbols, confidence interval lines, and data points. |
x.las |
x axes labels orientation. |
jf |
Jitter factor for dots. |
hsep |
Horizontal separation between the means and the dots. |
... |
Additional plot arguments. |
An alternative to the controversial dynamite plots.
If conf
is set to a value greater than or equal to 1, then it is interpreted
as number of standard deviations.
It returns a plot with the means represented by horizontal lines, a vertical line representing a confidence limit or a number of standard deviations, and alternatively the individual data points.
Raul Eyzaguirre
# Simulate some data
dfr <- data.frame(y = rnorm(50, sample(40:60, 5), sample(5:10, 5)),
g = rep(1:5, 10))
msdplot("y", "g", dfr, lwd = 2, pch = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.