addCol {Jmisc} | R Documentation |
Add a constant column to a data.frame or matrix
Description
Add a constant column to data.frame or matrix.
Usage
addCol(x, ..., value)
Arguments
x |
|
... |
constants |
value |
|
Value
a data.frame
or matrix
contains all columns
in x and those constant columns.
Author(s)
TszKin Julian Chan ctszkin@gmail.com
Examples
d=data.frame(x=1:5,y=11:15)
addCol(d,a=1,b=2,c=3)
addCol(d,value=c(a=100,b=200,c=300))
[Package Jmisc version 0.3.1.1 Index]