Sometime an object has attribute names for identification of the value with names instead of index. There are time you need to extract the names of a vector or object. The easiest way is to do: library(data.table) dt <- cars[1,] setDT(dt) str(dt) dt[, dist := as.
Read More