I have a dataset that includes presence absence of a variable based on hour and day. I'd like to plot presence (i.e., just "Y") by hour and day with day on the x and hour on the y axis. I'm just not good at this stuff and it's giving me trouble. See example data:
df <- data.frame("day"= c(1, 1, 1, 2, 2, 2, 3, 3, 3),"hour" = c(1, 2, 3, 1, 2, 2, 1, 2, 3),"a" = c("Y", "Y", "N", "N", "N", "Y", "N", "N", "Y"), "b" = c("N", "N", "Y", "N", "Y", "Y", "Y", "Y", "Y"))
Would love any suggestions.