Display row names in a data.table object

后端 未结 1 949
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-01 23:59

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

相关标签:
1条回答
  • 2020-12-02 00:25

    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).

    0 讨论(0)
提交回复
热议问题