Skip to content

print.data.table with trunc.cols=TRUE doesn't wrap the truncated column name list #5034

Description

@ChristopherEeles

May be related to #1523.

If a user wants to truncate a printed data.table to max 80 characters per line, wouldn't they also want to wrap the list of truncated columns with the same limit? This is currently not the case.

DT <- data.table(
    first_long_column_name=LETTERS[1:5],
    second_long_column_name=letters[1:5],
    third_long_column_name=1:5,
    fourth_long_column_name=LETTERS[1:5],
    fifth_long_column_name=1:5,
    sixth_long_column_name=letters[1:5]
)
print(DT, trunc.cols=TRUE)
##    first_long_column_name second_long_column_name third_long_column_name
## 1:                      A                       a                      1
## 2:                      B                       b                      2
## 3:                      C                       c                      3
## 4:                      D                       d                      4
## 5:                      E                       e                      5
## 3 variables not shown: [fourth_long_column_name, fifth_long_column_name, sixth_long_column_name]

Best,
Christopher Eeles

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions