Create a Data Frame from Rows

DESCRIPTION:

Create a data frame from rows.

USAGE:

rbind.data.frame(...) 

OPTIONAL ARGUMENTS:

...
individual data frames or vectors.

VALUE:

a data frame combining the arguments by rows.

HINTS:

This is a method for the generic function rbind() for objects that inherit from class "data.frame". If none of the arguments is a data frame, you will have to call the method explicitly, not by calling rbind(). The arguments should either be compatible data frames (with the same set of variables) or lists whose elements are suitable to be added on to the corresponding variables in a data frame argument. The first data frame encountered as an argument determines the form of the output. That is, the result of the function will be a data frame whose variables will be factors, ordered factors, numeric variables, and other kinds of variables according to what was found in the first data frame argument encountered.

WARNING:

This is not a very efficient way to build up a data frame in the case that many rows will be added in a loop; it does a lot of checking and re-computation each time. Several alternatives are faster: (1) write the rows to a file and use read.table() to read them in; (2) form a matrix (usually of mode character ) and convert it with as.data.frame(); (3) develop the individual variables and then bind them together with data.frame().