convenience function to set columns

sets columns of an object

convenience function to set columns

sets columns of an object

setcols(dt, old, new)

setcols(dt, old, new)

Arguments

dt

data frame/table or matrix

old

integer or character or logical vector corresponding to current colnames in dt

new

character vector for new column names

Value

colnamed object

colnamed object

Author

Kevin Hadi