File:Geomerrorbarh.png: Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

15 October 2023

  • curprev 20:3820:38, 15 October 2023Brb talk contribs 541 bytes +541 <syntaxhighlight lang='rsplus'> df <- data.frame( trt = factor(c("Treatment 1", "Treatment 2", "Treatment 3", "Treatment 4", "Treatment 5")), # treatment resp = c(1, 5, 3, 4, 2), # response se = c(0.1, 0.3, 0.3, 0.2, 0.2) # standard error ) # make 'Treatment 1' shown at the top df$trt <- factor(df$trt, levels = c("Treatment 5", "Treatment 4", "Treatment 3", "Treatment 2", "Treatment 1")) p <- ggplot(df, aes(resp, trt)) + geom_point() p + geom_errorbarh(aes(xmax=resp + se, xmin=resp-se),...