FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

print should abbreviate columns larger than options(width)? · Issue #7718 · Rdatatable/data.table · GitHub

print should abbreviate columns larger than options(width)? #7718

Description

Below I ask for width=10 but that is only respected for the first three numeric columns.

> options(width=10, datatable.prettyprint.char=NULL, datatable.print.trunc.cols=FALSE, datatable.print.class=FALSE)
> data.table(V1=1, V2=2, V3=3, x="12345678901234567890", L=list(1:9))
   V1 V2
1:  1  2
   V3
1:  3
                      x
1: 12345678901234567890
                    L
1: 1,2,3,4,5,6,...[9]

both x and L are wider than options(width=10), which seems to violate the definition in ?options:

     ‘width’:
          controls the maximum number of columns on a line used in
          printing vectors, matrices and arrays, and when filling by
          cat.

I would ask to change the output to:

   V1 V2
1:  1  2
   V3
1:  3
         x
1: 123456L
1: 1,2,3,…

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL