# color Code style_na("NA") Output [1] "\033[31mNA\033[39m" Code style_neg("-1") Output [1] "\033[31m-1\033[39m" --- Code xf <- (function() ctl_colonnade(list(x = c((10^(-3:4)) * c(-1, 1), NA)))) print(xf()) Output $body x  1 -0.001 2 0.01 3 -0.1 4 1 5 -10 6 100 7 -1000 8 10000 9 NA $extra_cols list() $abbrev_cols character(0) $abbrev_col_idxs numeric(0) Code with_options(pillar.subtle_num = TRUE, print(xf())) Output $body x  1 -0.001 2 0.01 3 -0.1 4 1 5 -10 6 100 7 -1000 8 10000 9 NA $extra_cols list() $abbrev_cols character(0) $abbrev_col_idxs numeric(0) Code with_options(pillar.subtle = FALSE, print(xf())) Output $body x  1 -0.001 2 0.01 3 -0.1 4 1 5 -10 6 100 7 -1000 8 10000 9 NA $extra_cols list() $abbrev_cols character(0) $abbrev_col_idxs numeric(0) Code with_options(pillar.neg = FALSE, print(xf())) Output $body x  1 -0.001 2 0.01 3 -0.1 4 1 5 -10 6 100 7 -1000 8 10000 9 NA $extra_cols list() $abbrev_cols character(0) $abbrev_col_idxs numeric(0) Code with_options(pillar.subtle = FALSE, pillar.neg = FALSE, print(xf())) Output $body x  1 -0.001 2 0.01 3 -0.1 4 1 5 -10 6 100 7 -1000 8 10000 9 NA $extra_cols list() $abbrev_cols character(0) $abbrev_col_idxs numeric(0) Code with_options(pillar.bold = TRUE, print(xf())) Output $body x  1 -0.001 2 0.01 3 -0.1 4 1 5 -10 6 100 7 -1000 8 10000 9 NA $extra_cols list() $abbrev_cols character(0) $abbrev_col_idxs numeric(0) --- Code ctl_colonnade(list(a_very_long_column_name = 0), width = 20) Output $body $extra_cols $extra_cols$a_very_long_column_name [1] 0 $abbrev_cols character(0) $abbrev_col_idxs numeric(0) # focus columns Code tbl_format_setup(x, width = 30, focus = "b") Output   # A data frame: 1 x 2  a$x $y b    1 1 2 long enough  Code tbl_format_setup(x, width = 20, focus = "b") Output   # A data frame: 1 x # 2  a$x b   1 1 long enough  # i 1 more # variable: # a$y  Code tbl_format_setup(x, width = 15, focus = "b") Output   # A data # frame: 1 x # 2  b  1 long enough  # i 1 more # variable: # a  Code tbl_format_setup(x, width = 10, focus = "b") Output   # A data # frame: # 1 x 2  b  1 long en~  # i 1 # more # variable: # a  Code tbl_format_setup(x[2:1], width = 30, focus = "a") Output   # A data frame: 1 x 2  b a$x $y    1 long enough 1 2  Code tbl_format_setup(x[2:1], width = 20, focus = "a") Output   # A data frame: 1 x # 2  b a$x $y    1 long ~ 1 2  Code tbl_format_setup(x[2:1], width = 15, focus = "a") Output   # A data # frame: 1 x # 2  a$x $y   1 1 2  # i 1 more # variable: # b  Code tbl_format_setup(x[2:1], width = 10, focus = "a") Output   # A data # frame: # 1 x 2  a$x  1 1  # i 2 # more # variables: # a$y , # b  Code tbl_format_setup(x, width = 30, focus = c("a", "b")) Output   # A data frame: 1 x 2  a$x $y b    1 1 2 long enough  Code tbl_format_setup(x, width = 20, focus = c("a", "b")) Output   # A data frame: 1 x # 2  a$x $y b    1 1 2 long ~  Code tbl_format_setup(x, width = 15, focus = c("a", "b")) Output   # A data # frame: 1 x # 2  a$x b   1 1 long e~  # i 1 more # variable: # a$y  Code tbl_format_setup(x, width = 10, focus = c("a", "b")) Output   # A data # frame: # 1 x 2  a$x  1 1  # i 2 # more # variables: # a$y , # b  Code tbl_format_setup(x[2:1], width = 30, focus = c("a", "b")) Output   # A data frame: 1 x 2  b a$x $y    1 long enough 1 2  Code tbl_format_setup(x[2:1], width = 20, focus = c("a", "b")) Output   # A data frame: 1 x # 2  b a$x   1 long enough 1  # i 1 more # variable: # a$y  Code tbl_format_setup(x[2:1], width = 15, focus = c("a", "b")) Output   # A data # frame: 1 x # 2  b a$x   1 long e~ 1  # i 1 more # variable: # a$y  Code tbl_format_setup(x[2:1], width = 10, focus = c("a", "b")) Output   # A data # frame: # 1 x 2  b  1 long en~  # i 1 # more # variable: # a