getnrows: Get the number of rows of the file

View source: R/getnrows.R

getnrowsR Documentation

Get the number of rows of the file

Description

Use iterators to avoid the memory overhead of obtaining the number of rows of a file.

Usage

getnrows(file, n = 10000)

Arguments

file

the name of a file (possible with a path)

n

the size of the chunks used by the iterator

Value

an integer

Examples

data(CO2)
write.csv(CO2, "CO2.csv", row.names=FALSE)
getnrows("CO2.csv")
unlink("CO2.csv")

YaleToolkit documentation built on May 10, 2022, 1:05 a.m.