# Replicating double histogram for RTs using ggplot2 # (based on R code for FIgure 6-6 on p. 122 of # Chang, W. (2013). R graphics cookbook. O'Reilly. rtdat = read.table("RTs.txt",T) library(ggplot2) rtdat$Participant = as.factor(rtdat$Participant) ggplot(rtdat, aes(x=RT,fill=Participant)) + geom_histogram(position="identity", alpha=0.4)