Read specified columns from a file
Reads specified columns from a file in table format and creates a data frame from it, with cases corresponding to lines and variables to fields in the file.
read.columns(file, required.col=NULL, text.to.search="", sep="\t", quote="\"", skip=0, fill=TRUE, blank.lines.skip=TRUE, comment.char="", allowEscapes=FALSE, ...)
file |
the name of the file which the data are to be read from. |
required.col |
character vector of names of the required columns |
text.to.search |
character string. If any column names can be found in this string, those columns will also be read. |
sep |
the field separator character |
quote |
character string of characters to be treated as quote marks |
skip |
the number of lines of the data file to skip before beginning to read data. |
fill |
logical: if |
blank.lines.skip |
logical: if |
comment.char |
character: a character vector of length one containing a single character or an empty string. |
allowEscapes |
logical. Should C-style escapes such as \n be processed or read verbatim (the default)? |
... |
other arguments are passed to |
This function is an interface to read.table
in the base package.
It uses required.col
and text.to.search
to set up the colClasses
argument of read.table
.
Note the following arguments of read.table
are used by read.columns
and therefore cannot be set by the user:
header
, col.names
, check.names
and colClasses
.
This function is used by read.maimages
.
A data frame (data.frame) containing a representation of the data in the file.
Gordon Smyth
An overview of LIMMA functions for reading data is given in 03.ReadingData.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.