par(mfrow = c(2,1))
hist(example4$response[example4$group==1],breaks = 6,xlim = c(12,17),
ylim = c(0,7),ylab = "Count",xlab = "",main = "Group 1",col = "blue")
hist(example4$response[example4$group==2],breaks = 25,xlim = c(12,17),
ylim = c(0,7),ylab = "Count",xlab = "Response",main = "Group 2",col = "blue")
Run the code above in your browser using DataLab