word_count {k5}R Documentation

Count file words, lines, and bytes

Description

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

Usage

word_count(path, count = "")

Arguments

path

Character vector of file paths.

count

The type of element to count, see details.

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.

Value

A data frame of counts by file.


[Package k5 version 0.2.1 Index]