I'm using ggplot2 and trying to change the order of bins. I'm using the data for NY's Stop and Frisk program found here: http://www.nyclu.org/content/stop-and-frisk-data
The times are given as integers (ex: 5 = 12:05 AM, 355 = 3:55 AM, 2100 = 9 PM).
I used the following to create a histogram of the times of stops
myplot <- ggplot(Stop.and.Frisk.2011) + geom_histogram(aes(x=timestop),binwidth=300)
This gave me a fairly good graph of times, with the bins going from Midnight-3 AM, 3AM - 6 AM, 6 AM - 9 AM, etc.
However, I'm hoping to move the first two bins (Midnight - 3 AM and 6 AM - 9 AM) to the end to simulate more of a normal work day.
Is there a simple way to change the order of the bins? I've tried using the breaks function, but can't find a way to get it to loop back around.
Essentially, I want the bins to be in the following order: 600-900, 900-1200, 1200-1500, 1500-1800, 1800-2100, 2100-2400, 0-300, 300-600.
Thanks in advance!