daily pastebin goal
63%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top