count_lines: Count Lines

View source: R/text.r

count_linesR Documentation

Count Lines

Description

Count the number of lines in a given text file

Usage

count_lines(filepath, batch)

Arguments

filepath

A path to the text file to read

batch

The number of lines to read in at one time

Details

This function counts the lines of a given text file line by line to prevent reading the entire file into memory at once. Higher batch numbers generally equal quicker read times.

Value

An integer indicating number of lines


lukehannan/lumisc documentation built on May 9, 2022, 12:59 p.m.