summary_file: Summary of File Word Counts

Description Usage Arguments Value Examples

Description

A wrapper around the rcpp_summary function. Given a file, get the unique words, their counts, and the number of documents they appeared in. The flag argument specifies if there are more than one document per text file. Set to 0 if that is the case and the documents are delimited by newlines. Set to 1 if there is only one document in the file.

Usage

1
summary_file(ipath, flag = 0)

Arguments

ipath

A string specifying the path to the file.

flag

**optional** A number, set to 1 if only one document per text file.

Value

A dataframe object with term, freq, doccount fields.

Examples

1
2
3
4
5
## Not run: 
summary_file("10documents.txt")
summary_file("onedocument.txt", 1)

## End(Not run)

avkoehl/textprocessingDSI documentation built on June 5, 2019, 7:41 p.m.