Reference: While trying to answer this very basic question, I suddenly realized that I wasn\'t able to display rownames
in a data.table
object
This is more or less verbatim from comments.
data.table
doesn't support row names. This is intentional, as row names are a bad design choice, because they are far more cumbersome to use than columns (and especially so in data.table
, where columns are so much easier to deal with than in data.frame
) and are only a subset of what kind of data columns can represent (recall that row names in data.frame
are a character vector only, whereas columns can be anything).