R/meansplot.R

Defines functions meansplot

Documented in meansplot

meansplot <- function(y, grp) {
    stripchart(y ~ grp, pch = 1, vert = TRUE)
    means <- tapply(y, grp, mean)
    abline(h = mean(y), lty = 3)
    for (i in 1:length(means)) {
        segments(i - 0.2, means[i], i + 0.2, means[i], 
            col = "darkgray", lwd = 5)
    }
}

Try the evidence package in your browser

Any scripts or data that you put into this service are public.

evidence documentation built on May 2, 2019, 2:14 p.m.