Guest User

Untitled

a guest
Apr 21st, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. # Michael A. Alcorn
  2.  
  3. library(ggplot2)
  4. library(plyr)
  5.  
  6. data <- read.csv("species.csv")
  7. data$Date <- as.Date(data$Date, "%Y-%m-%d")
  8.  
  9. ggplot(data, aes(Date, Total)) + geom_line() + scale_x_date(date_breaks = "1 month")
  10.  
  11. state.counts <- count(data$State)
  12. ggplot(state.counts, aes(x = reorder(x, -freq), freq)) + geom_bar(stat = "identity") + labs(x = "State", y = "Count")
Add Comment
Please, Sign In to add comment