File:Rerrorbars.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.

24 March 2022

  • curprev 19:3919:39, 24 March 2022Brb talk contribs 883 bytes +883 <pre> library(ggplot2) df <- ToothGrowth df$dosef <- as.factor(df$dose) library(dplyr) df.summary <- df %>% group_by(dosef) %>% summarise( sd = sd(len, na.rm = TRUE), len = mean(len) ) df.summary p1 <- ggplot(df, aes(dosef, len)) + geom_jitter(position = position_jitter(0.2, seed=1), color = "darkgray") + geom_point(aes(x=dosef, y=len), shape="+", size=8, data=df.summary) + geom_errorbar(aes(ymin = len-sd, ymax = len+sd), width=.2, data = df.summary) df.summary$dose <...