Skip to content

print.data.table : expose options('data.table.print.row.names') #1097

@smcinerney

Description

@smcinerney

A FR for print.data.table to use options('data.table.print.row.names')to determine whether to print row.names or not. (Default: TRUE)

Currently it always prints row,names (followed by colon), and this setting is not exposed as either an option, or a function argument.

DT = data.table(x = 1:3, y=list(1:2, 3:4, 5:7))
data.table:::print.data.table(DT)
#    x     y
#1: 1   1,2
#2: 2   3,4
#3: 3 5,6,7

options('data.table.print.row.names' = F)
data.table:::print.data.table(DT)
#    x     y
#  1   1,2
#  2   3,4
#  3 5,6,7

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions