Return colnames in a table with index numbers.
icolnames(df)
df
A data.frame object.
A data.table with the two columns index and name is returned.
data.table
index
name
data("iris") icolnames(iris)