I have a database of incidents by their date. I want to create a frequency table of incidents by month and year.
I am using this code below:
table(format(dat$Report.Date,"%m/%Y"))
01/2004 01/2005 01/2006 01/2007 01/2008 01/2009 01/2011 01/2012 01/2013 01/2014 ...
It doesn't sort chronologically. I tried sort() and order() and it did not work. I want this output:
01/2004, 02/2004, 03/2004 ... 12/2004, 1/2005...
What should I do?