Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Y2009 <- filter(Data, IncidentDate < 20100000 & IncidentDate > 20090000)
- Y2010 <- filter(Data, IncidentDate < 20110000 & IncidentDate > 20100000)
- Y2011 <- filter(Data, IncidentDate < 20120000 & IncidentDate > 20110000)
- Y2012 <- filter(Data, IncidentDate < 20130000 & IncidentDate > 20120000)
- Y2013 <- filter(Data, IncidentDate < 20140000 & IncidentDate > 20130000)
- Y2014 <- filter(Data, IncidentDate < 20150000 & IncidentDate > 20140000)
- Y2015 <- filter(Data, IncidentDate < 20160000 & IncidentDate > 20150000)
- Y2016 <- filter(Data, IncidentDate < 20170000 & IncidentDate > 20160000)
- Y2017 <- filter(Data, IncidentDate < 20180000 & IncidentDate > 20170000)
- Y2018 <- filter(Data, IncidentDate < 20190000 & IncidentDate > 20180000)
- Y2019 <- filter(Data, IncidentDate < 20200000 & IncidentDate > 20190000)
- par(mfrow=c(5,1))
- hist(Y2009[,"IncidentDate"])
- hist(Y2010[,"IncidentDate"])
- hist(Y2011[,"IncidentDate"])
- hist(Y2012[,"IncidentDate"])
- hist(Y2013[,"IncidentDate"])
- #page2
- hist(Y2014[,"IncidentDate"])
- hist(Y2015[,"IncidentDate"])
- hist(Y2016[,"IncidentDate"])
- hist(Y2017[,"IncidentDate"])
- hist(Y2018[,"IncidentDate"])
- hist(Y2019[,"IncidentDate"])
- #I want to try group the dates by month to simplify it. And do it with a function to make it more elegant.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement