```r
tf_idf <- words_by_newsgroup %>%
  bind_tf_idf(word, newsgroup, n) %>%
  arrange(desc(tf_idf))

tf_idf
```

```
## # A tibble: 173,913 x 6
##    newsgroup                word               n      tf   idf tf_idf
##    <chr>                    <chr>          <int>   <dbl> <dbl>  <dbl>
##  1 comp.sys.ibm.pc.hardware scsi             483 0.0176   1.20 0.0212
##  2 talk.politics.mideast    armenian         582 0.00805  2.30 0.0185
##  3 rec.motorcycles          bike             324 0.0139   1.20 0.0167
##  4 talk.politics.mideast    armenians        509 0.00704  2.30 0.0162
##  5 sci.crypt                encryption       410 0.00816  1.90 0.0155
##  6 rec.sport.hockey         nhl              157 0.00440  3.00 0.0132
##  7 talk.politics.misc       stephanopoulos   158 0.00416  3.00 0.0125
##  8 rec.motorcycles          bikes             97 0.00416  3.00 0.0125
##  9 rec.sport.hockey         hockey           270 0.00756  1.61 0.0122
## 10 comp.windows.x           oname            136 0.00354  3.00 0.0106
## # … with 173,903 more rows
```