Learn R Programming

R.filesets (version 2.15.1)

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

Description

Reads the tabular data as a data frame.

Usage

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

Value

Returns a data.frame.

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.

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

Henrik Bengtsson

See Also

For more information see TabularTextFile.