Learn R Programming

NMdata (version 0.2.3)

getLines: read lines as needed

Description

Functions that take file and lines arguments can use this function to derive lines no matter what was provided.

Usage

getLines(
  file,
  lines,
  linesep = "\n",
  simplify = TRUE,
  col.model,
  modelname,
  as.one
)

Arguments

file

A file path to a a text file to read.

lines

Text lines if file was already read.

as.one

If the `file` argument is used and if `as.one` is TRUE, the file(s) are read and put into a `data.table` with a model column and a `text` column. Default is FALSE. Be careful with this, as it returns different formats whether the `file` or the `lines` argument is used.