Skip to content

Instantly share code, notes, and snippets.

@ProQuestionAsker
Created January 11, 2017 09:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ProQuestionAsker/047fc29dea4984779c51a628af759ae0 to your computer and use it in GitHub Desktop.
Save ProQuestionAsker/047fc29dea4984779c51a628af759ae0 to your computer and use it in GitHub Desktop.
# Counting words per character
RO_full2 <- RO_full %>%
mutate(count = stri_count(Words, regex = "\\S+")) %>%
group_by(Character, Gender) %>%
summarise(Total_Words = sum(count)) %>%
filter(!(Gender == "unknown"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment