Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. biomass <-
  2. time prefish1 obsfish1 prefish2 obsfish2
  3. 1 0.011 0.002 0.007 0.002
  4. 2 0.011 0.007
  5. 3 0.010 0.002 0.007 0.002
  6. 4 0.010 0.007
  7. 5 0.010 0.006
  8. 6 0.010 0.002 0.006 0.002
  9.  
  10. for (i in biomass[2]) {
  11. }
  12. for (k in biomass[3]) {
  13.  
  14. }
  15. } ##this will call just columns 2 and 3 as a pair.##
  16. ggplot(biomass, aes(x= time)) +
  17. geom_line(aes(y=i)) +
  18. geom_point(aes(y=k)) +
  19. ggtitle(i) + ylab("biomass t/km2") +
  20. ##I would also like to title them using the header one of the column pairs##
  21. theme_classic()
  22.  
  23. for (i in biomass[c(2,4)]) {
  24. }
  25. for (k in biomass[c(3,5)]) {
  26.  
  27. }
  28. } ##this will add all of those vectors together and produce one graph, I would like 2,3 to be two lines, 4,5 to be two lines, 6,7 etc on one graph##
  29. ggplot(biomass, aes(x= time)) +
  30. geom_line(aes(y=i)) +
  31. geom_point(aes(y=k)) +
  32. ggtitle(i) + ylab("biomass t/km2") +
  33. theme_classic()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement