Build Data Frame from Columns

DESCRIPTION:

Build a data frame by combining vectors, existing data frames, or matrices.

USAGE:

cbind.data.frame(..., row.names, other arguments)

REQUIRED ARGUMENTS:

...
either vectors, data frames, or matrices.

OPTIONAL ARGUMENTS:

row.names
optional row names for the result.
other arguments
see the help for data.frame.

VALUE:

a data frame, formed using the vectors, the variables in the data frames, or the columns of the matrices as variables. If row names are not supplied, the first row names of a data frame or matrix encountered will be used.

DETAILS:

Calling this function is nearly equivalent to calling data.frame. See the help for data.frame for information on other arguments to control the creation of row and column names, etc.

This is a method for the generic function cbind. Calling cbind when at least one argument is a data frame is equivalent to calling data.frame with the same arguments, with the exception of control arguments check.names and deparse.level.

The argument check.names is FALSE by default, so duplicate variable names are not changed.

If you want variable names to be made unique, either use check.names=TRUE or call data.frame instead of cbind.

The argument deparse.level (an argument to cbind) is ignored. Names created correspond to deparse.level=1.

SEE ALSO:

, .

EXAMPLES:

cbind(1, fuel.frame)

x <- data.frame(a=1:3)
cbind(x,x)      # variable names are "a", "a"
data.frame(x,x) # variable names are "a", "a1"