Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- df1 <- data.frame(Background = factor(c("Input", "H3", "Overlap","Input", "H3", "Overlap"), levels=c("Input", "H3", "Overlap")),
- Condition = factor(c("control", "control", "control","treatment", "treatment", "treatment")),
- Count = c(10, 9, 5, 8, 7, 6))
- barplot = ggplot(data=df1, aes(x=Condition, y=Count, fill=Background)) +
- geom_bar(position=position_dodge()) +
- facet_grid(. ~ Condition)
- barplot = ggplot(data=df1, aes(x=Background, y=Count, fill=Background)) +
- geom_bar(position='dodge') +
- facet_grid(.~Condition)
Add Comment
Please, Sign In to add comment