Invoke system tool to print newline, word, and byte counts for each file.

word_count(path, count = "")

Arguments

path

Character vector of file paths.

count

The type of element to count, see details.

Value

A data frame of counts by file.

Details

One of five options or an empty string (default):

  1. "lines" for newline characters (separating lines).

  2. "words" for words separated by white space.

  3. "chars" for individual characters.

  4. "bytes" for total bytes, differs with multibyte characters.

  5. "max" for the maximum display width of longest line.