Skip to content

Option tibble.width not working #369

@EdwardJRoss

Description

@EdwardJRoss

The tibble.width option doesn't seem to affect the width of the tibble being printed.

As a user I set tibble.width to Inf to view very long data frames (scrolling horizontally in my window).
A partial workaround is to set width to 10000, but this has other implications.

Example:

options(tibble.width=Inf, width=40)
tibble::as_tibble(iris)
#># A tibble: 150 x 5
#>   Sepal.Length Sepal.Width
#>          <dbl>       <dbl>
#> 1         5.10        3.50
#> 2         4.90        3.00
#> 3         4.70        3.20
#> 4         4.60        3.10
#> 5         5.00        3.60
#> 6         5.40        3.90
#> 7         4.60        3.40
#> 8         5.00        3.40
#> 9         4.40        2.90
#>10         4.90        3.10
#># ... with 140 more rows, and 3 more
#>#   variables: Petal.Length <dbl>,
#>#   Petal.Width <dbl>, Species <fct>

Expected output:
As per the documentation all columns should be printed

options(tibble.width = Inf) will always print all columns, regardless of the width of the screen.

This is the behaviour in tibble 1.3.4

options(tibble.width=Inf, width=40)
tibble::as_tibble(iris)
#># A tibble: 150 x 5
#>   Sepal.Length Sepal.Width Petal.Length Petal.Width Species
#>          <dbl>       <dbl>        <dbl>       <dbl>  <fctr>
#> 1          5.1         3.5          1.4         0.2  setosa
#> 2          4.9         3.0          1.4         0.2  setosa
#> 3          4.7         3.2          1.3         0.2  setosa
#> 4          4.6         3.1          1.5         0.2  setosa
#> 5          5.0         3.6          1.4         0.2  setosa
#> 6          5.4         3.9          1.7         0.4  setosa
#> 7          4.6         3.4          1.4         0.3  setosa
#> 8          5.0         3.4          1.5         0.2  setosa
#> 9          4.4         2.9          1.4         0.2  setosa
#>10          4.9         3.1          1.5         0.1  setosa
#># ... with 140 more rows

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions