Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. # create a dataset
  2. specie=c(rep("sorgho" , 3) , rep("poacee" , 3) , rep("banana" , 3) ,
  3. rep("triticum" , 3) )
  4. condition=rep(c("normal" , "stress" , "Nitrogen") , 4)
  5. value=abs(rnorm(12 , 0 , 15))
  6. data=data.frame(specie,condition,value)
  7.  
  8. # Grouped
  9. ggplot(data, aes(fill=condition, y=value, x=specie)) +
  10. geom_bar(position="dodge", stat="identity")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement