Spark Online Training by Edureka

ireadLines: Iterator over Lines of Text from a Connection

Description Usage Arguments Value See Also Examples

Description

Returns an iterator over the lines of text from a connection. It is a wrapper around the standard readLines function.

Usage

1
ireadLines(con, n=1, ...)

Arguments

con

a connection object or a character string.

n

integer. The maximum number of lines to read. Negative values indicate that one should read up to the end of the connection. The default value is 1.

...

passed on to the readLines function.

Value

The line reading iterator.

See Also

readLines

Examples

1
2
3
4
5
  # create an iterator over the lines of COPYING
  it <- ireadLines(file.path(R.home(), 'COPYING'))
  nextElem(it)
  nextElem(it)
  nextElem(it)


Search within the iterators package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.