In R, I can return the count results using the specific column names I am interested in as an array as below.
require(\"plyr\") bevs <- data.frame(cbind(n
You want a contingency table, which you can create using table:
table
table(bevs[, c("name", "drink")]) # drink #name cocoa coffee tea water # Bill 2 2 0 0 # Llib 0 0 2 2