Created
November 12, 2014 09:02
-
-
Save gfrmin/a29c2d77b96605d37617 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
police <- police[!grep("total",Result)][`Major Category` != "All"][,!c("Total.2012/13","Total.2011/12"),with=FALSE] | |
police <- gather(police, key, number, -Result, -`Major Category`) | |
police <- separate(police, key, into=c("Complaint", "Year"), sep="\\.") | |
police[,Result := factor(Result, levels = unique(police$Result))] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment