Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. library(cluster.datasets)
  2. library(tidyverse)
  3. library(gridExtra)
  4.  
  5. data(all.mammals.milk.1956)
  6.  
  7. plot1 <- all.mammals.milk.1956 %>%
  8. ggplot(aes(x = "all mammals", y = water)) +
  9. geom_jitter(width = .025, height = 0, size = 2, alpha = .5, color = "blue") +
  10. labs(x = "", y="percentage of water")
  11.  
  12. plot2 <- all.mammals.milk.1956 %>%
  13. ggplot(aes(x = "all mammals", y = protein)) +
  14. geom_jitter(width = .02, height = 0, size = 2, alpha = .6, color = "orange") +
  15. labs(x = "", y="percentage of protein")
  16.  
  17. plot3 <- all.mammals.milk.1956 %>%
  18. ggplot(aes(x = "all mammals", y = fat)) +
  19. geom_jitter(width = .02, height = 0, size = 2, alpha = .6, color = "green") +
  20. labs(x = "", y="percentage of fat")
  21.  
  22. plot4 <- all.mammals.milk.1956 %>%
  23. ggplot(aes(x = "all mammals", y = lactose)) +
  24. geom_jitter(width = .02, height = 0, size = 2, alpha = .6, color = "red") +
  25. labs(x = "", y="percentage of lactose")
  26.  
  27. plot5 <- all.mammals.milk.1956 %>%
  28. ggplot(aes(x = "all mammals", y = ash)) +
  29. geom_jitter(width = .02, height = 0, size = 2, alpha = .6, color = "violet") +
  30. labs(x = "", y="percentage of ash")
  31.  
  32. grid.arrange(plot1, plot2, plot3, plot4, plot5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement