tab <- with(
subset(d.pizza, driver %in% c("Carpenter","Miller","Farmer","Butcher")),
table(factor(driver), Weekday(date, "a", stringsAsFactor=TRUE))
)
tab
barplot(tab, beside=FALSE, space=1.2)
AddConnLines(tab, beside=FALSE, space=1.2, lcol="grey50", lwd=1, lty=2)
barplot(tab, beside=FALSE, space=1.2, horiz=TRUE)
AddConnLines(tab, beside=FALSE, space=1.2, horiz=TRUE, lcol="grey50", lwd=1, lty=2)
Run the code above in your browser using DataLab