I have this data frame t
structure(list(Day = structure(c(4L, 5L, 3L, 1L), .Label = c("Fri",
"Mon", "Thu", "Tue", "Wed"), class = "factor"), Month = structure(c(16436,
16436, 16436, 16436), class = "Date"), Total = c(4, 4, 1, 1)), .Names = c("Day",
"Month", "Total"), row.names = c(1L, 2L, 5L, 10L), class = "data.frame")
I like to create a heatmap where day will be my y-axis and Month will be my x-axis.
When I do this:
ggplot(t, aes(Month, Day, fill=Total)) + geom_tile()
yaxis is not in order, I like to order from Monday, Tues, Wed etc.
Any ideas how I could do this?