Skip to content

Instantly share code, notes, and snippets.

@raryskin
raryskin / example_bar_plot.R
Created April 26, 2019 01:55
quick example of a (not ugly) ggplot bar graph with points for individual subjects and error bars
# example of bar plot with individual subject points for Anya -04/24/2019
# added error bars - 04/25/2019
library(tidyverse) #will need to install this first (run: install.packages("tidyverse"))
## fake data
data = tibble( # creating a dataframe (aka "tibble") called data
subject = rep(1:10,times = 2 ), # making a column/vector of subject numbers (1-10) x2
condition = rep(c("hard", "easy"), each = 10), # making a column/vector of condition names