SHARE
TWEET

Untitled

a guest Oct 17th, 2019 132 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Y2009 <- filter(Data, IncidentDate < 20100000 & IncidentDate > 20090000)
  2. Y2010 <- filter(Data, IncidentDate < 20110000 & IncidentDate > 20100000)
  3. Y2011 <- filter(Data, IncidentDate < 20120000 & IncidentDate > 20110000)
  4. Y2012 <- filter(Data, IncidentDate < 20130000 & IncidentDate > 20120000)
  5. Y2013 <- filter(Data, IncidentDate < 20140000 & IncidentDate > 20130000)
  6. Y2014 <- filter(Data, IncidentDate < 20150000 & IncidentDate > 20140000)
  7. Y2015 <- filter(Data, IncidentDate < 20160000 & IncidentDate > 20150000)
  8. Y2016 <- filter(Data, IncidentDate < 20170000 & IncidentDate > 20160000)
  9. Y2017 <- filter(Data, IncidentDate < 20180000 & IncidentDate > 20170000)
  10. Y2018 <- filter(Data, IncidentDate < 20190000 & IncidentDate > 20180000)
  11. Y2019 <- filter(Data, IncidentDate < 20200000 & IncidentDate > 20190000)
  12. par(mfrow=c(5,1))
  13. hist(Y2009[,"IncidentDate"])
  14. hist(Y2010[,"IncidentDate"])
  15. hist(Y2011[,"IncidentDate"])
  16. hist(Y2012[,"IncidentDate"])
  17. hist(Y2013[,"IncidentDate"])
  18. #page2
  19. hist(Y2014[,"IncidentDate"])
  20. hist(Y2015[,"IncidentDate"])
  21. hist(Y2016[,"IncidentDate"])
  22. hist(Y2017[,"IncidentDate"])
  23. hist(Y2018[,"IncidentDate"])
  24. hist(Y2019[,"IncidentDate"])
  25. #I want to try group the dates by month to simplify it. And do it with a function to make it more elegant.
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