Learn R Programming

LaF (version 0.8.6)

read_lines: Read lines from the file

Description

Reads the specified lines and columns from the data file.

Usage

read_lines(x, ...)

# S4 method for laf read_lines(x, rows, columns = 1:ncol(x), ...)

# S4 method for laf_column read_lines(x, rows, columns = 1:ncol(x), ...)

Arguments

x

an object the supports the read_lines method, such as an laf object.

...

passed on to other methods.

rows

a numeric vector with the rows that should be read from the file.

columns

an integer vector with the columns that should be read in.

Details

Note that when scanning through the complete file next_block is much faster. Also note that random file access can be slow (and is always much slower than sequential file access), especially for certain file types such as comma separated. Reading is generally faster when the lines that should be read are sorted.