get.nlines {readmoRe}R Documentation

Determine the number of lines in a (large) text file without importing it.

Description

Determine the number of lines in a (large) text file without importing it.

Usage

get.nlines(file, n = 1, pattern = NULL, incl.header = FALSE)

Arguments

file

character of length 1. File path.

n

integer. Maximum number of lines to read when determining the 'skip' value. Passed to 'get.skip'.

pattern

character. Search pattern to find a certain row in 'file'. Passed to 'get.skip'.

incl.header

logical. Should the file header be included in the count? Length of the header will be determined by 'get.skip' and the 'pattern' argument. Defaults to 'FALSE'.

Value

An integer value.


[Package readmoRe version 0.2-12 Index]