addColumn {iSPlot} | R Documentation |
addColumn adds a column to a dataframe or matrix. The only checking this function performs is that the data vector is of the right length.
addColumn(dataF, data, colName)
dataF |
the dataframe or matrix |
data |
the data vector, which must be the same length as the first dimension of the dataframe or matrix |
colName |
the name of the column |
the dataframe or matrix with the added column is returned
Elizabeth Whalen
data(USArrests) x<-USArrests y<-addColumn(x,rep("red",dim(x)[1]),"color")