I want two bars for each day of the week -- one for presence of behavior (logical > 0) and one for absence of behavior ( == 0) according to my data.
Right now I'm using the following, but it is graphing a single bar, which takes into account the zeros in my data. Would like to do this grouped bar as simply as possible (or without much modification to current code)
Data$weekday <- factor(Data$weekday, levels= c("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday","Saturday"))
y <- by(Data$Variable, EMA$weekday, mean, na.rm = TRUE)
barplot(y, main = "title", ylab = "axis label")