count.chars {parser}R Documentation

Counts the number of characters and bytes in each line of a file

Description

This follows the same rules as the parser to count the number of characters and the number of bytes in each line of a file

Usage

count.chars(file, encoding = "unknown")

Arguments

file file path
encoding encoding to assume for the file

Value

A matrix with 2 columns and one line per line in the input file Each line of the matrix gives :

the number of characters in the same line in the file
the number of bytes in the same line in the file

Author(s)

Romain Francois <francoisromain@free.fr>

See Also

nlines, parse

Examples

## Not run: 
f <- system.file( "grammar.output", package= "parser" )
head( count.chars( f ) ) 
## End(Not run)

[Package parser version 0.0-3 Index]