Guest User

Untitled

a guest
Jan 18th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. df1 <- data.frame(Background = factor(c("Input", "H3", "Overlap","Input", "H3", "Overlap"), levels=c("Input", "H3", "Overlap")),
  2. Condition = factor(c("control", "control", "control","treatment", "treatment", "treatment")),
  3. Count = c(10, 9, 5, 8, 7, 6))
  4.  
  5. barplot = ggplot(data=df1, aes(x=Condition, y=Count, fill=Background)) +
  6. geom_bar(position=position_dodge()) +
  7. facet_grid(. ~ Condition)
  8.  
  9. barplot = ggplot(data=df1, aes(x=Background, y=Count, fill=Background)) +
  10. geom_bar(position='dodge') +
  11. facet_grid(.~Condition)
Add Comment
Please, Sign In to add comment