dat <- data.frame(
text = c("I like excellent chicken.", "I want eggs benedict now.", "Really?"),
group = c("A", "B", "A")
)
tally_short_vector_by(dat$text, dat$group)
with(presidential_debates_2012, tally_short_vector_by(dialogue, person))
with(presidential_debates_2012, tally_short_vector_by(dialogue, list(role, time)))
with(presidential_debates_2012, tally_short_vector_by(dialogue, list(person, time)))
Run the code above in your browser using DataLab