Get the number of lines of a file.

nlines(file)

Arguments

file

Path of the file.

Value

The number of lines as one integer.

Examples

tmp <- fwrite2(iris)
nlines(tmp)
#> [1] 151