Gt: cols_width removes last column when table has rownames

Created on 19 Feb 2020  路  1Comment  路  Source: rstudio/gt

I really like the package, thanks for developing it! I'm trying to set the width of columns in a table with col_widths, but when the table has one column specificied as rowname_col, the last column in the table isn't shown.

works as expected

iris %>% 
  gt() %>% 
  cols_width(
    vars(Sepal.Width) ~ px(120),
    vars(Petal.Length) ~ px(120),
    vars(Petal.Width) ~ px(120),
    vars(Species) ~ px(120),
    everything() ~ px(250))

Screenshot 2020-02-19 16 39 14

Species column is removed when Sepal.Length made into rownames

iris %>% 
  gt(rowname_col = 'Sepal.Length') %>% 
  cols_width(
    vars(Sepal.Width) ~ px(120),
    vars(Petal.Length) ~ px(120),
    vars(Petal.Width) ~ px(120),
    vars(Species) ~ px(120),
    everything() ~ px(250))

Screenshot 2020-02-19 16 37 56

[2] Intermediate [2] Medium 鈾笌 Critical 鈽癸笌 Bug

Most helpful comment

Thanks so much for reporting this. This will get fixed soon!

>All comments

Thanks so much for reporting this. This will get fixed soon!

Was this page helpful?
0 / 5 - 0 ratings