wordcounts_doc_lengths: Calculate document lengths

wordcounts_doc_lengthsR Documentation

Calculate document lengths

Description

Given a wordcounts long-format dataframe returned by read_wordcounts, calculate document lengths. This is just a convenience function for a straightforward summarize. It's often useful to filter a set of documents by (unstopped) length before modeling, and it's a good idea to check the distribution of document lengths before modeling, as this can substantially influence modeling outcomes.

Usage

wordcounts_doc_lengths(counts)

Arguments

counts

The dataframe from read_wordcounts

Value

A dataframe with id and length columns

See Also

read_wordcounts


agoldst/dfrtopics documentation built on July 15, 2022, 4:13 p.m.