readDataFrame.TabularTextFile: Reads the tabular data as a data frame

readDataFrame.TabularTextFileR Documentation

Reads the tabular data as a data frame

Description

Reads the tabular data as a data frame.

Usage

## S3 method for class 'TabularTextFile'
readDataFrame(this, con=NULL, rows=NULL, nrow=NULL, trimQuotes=FALSE, ..., debug=FALSE,
  verbose=FALSE)

Arguments

con

(Internal) If a connection, then it is used, otherwise a new file connection is temporarily opened and used.

rows

(Optional) An integer vector specifying which rows to be read.

nrow

(Optional) An integer specifying how many rows to read. If specified, it corresponds to specifying rows=seq_len(nrow).

trimQuotes

(Optional) If TRUE, quotes are trimmed from numeric columns before parsing them as numerics. This makes it possible to read quoted numeric values.

...

Passed to internal *getReadArguments().

debug

If TRUE, additional details on the file and how it was read is returned as part of the attributes.

verbose

A logical or a Verbose object.

Value

Returns a data.frame.

Reading quoted numerics

If a specific data column is specified as being numeric in argument colClasses and that column contains quoted values it is necessary to use argument trimQuotes=TRUE, otherwise scan() throws an exception similar to: scan() expected 'a real', got '"1.0"'.

Author(s)

Henrik Bengtsson

See Also

For more information see TabularTextFile.


HenrikBengtsson/R.filesets documentation built on Jan. 31, 2024, 8:11 a.m.