dgrtwo / tidy-text-mining

Manuscript of the book "Tidy Text Mining with R" by Julia Silge and David Robinson
http://tidytextmining.com
Other
1.31k stars 806 forks source link

explain `index = linenumber %/% 100` in sentiment analysis chapter #19

Closed stephenturner closed 7 years ago

stephenturner commented 7 years ago

I realize this may be more of a dplyr thing and outside the scope of your book, so please feel free to close and ignore.

I'm not sure I grok what's happening with the count(book, index = linenumber %/% 100, sentiment) and later the count(method, index = linenumber %/% 80, sentiment) %>% lines in the sentiment analysis chapter. A sentence or so explanation of what this is doing would be welcome!