addColumn {iSPlot}R Documentation

Add a column to a dataframe or matrix

Description

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.

Usage

addColumn(dataF, data, colName)

Arguments

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

Value

the dataframe or matrix with the added column is returned

Author(s)

Elizabeth Whalen

See Also

loadDFData

Examples

  data(USArrests)
  x<-USArrests
  y<-addColumn(x,rep("red",dim(x)[1]),"color")

[Package iSPlot version 1.0.3 Index]