1

I'm using the expss package to generate tables and then passing them to huxtable This works fine but height function does not seem to work. Any insights? This occurs regardless of using a theme or exporting to HTML or Word.

t<-mpg %>% tab_cells(hwy,displ) %>%
  tab_rows(manufacturer) %>% 
  tab_stat_mean() %>%
  tab_pivot() %>% 
  set_caption("Car Stats") %>% 
  as_huxtable() %>% 
  set_col_width(1,.1)  %>%
  theme_article()

height(t)<-0.1   # if I change this to 0.2 I get the same result...

t
Ben
  • 1,113
  • 10
  • 26

1 Answers1

1

The row height minimum is 1.0. To place rows closer together, use padding as shown below:

mpg %>% tab_cells(hwy,displ) %>%
  tab_rows(manufacturer) %>% 
  tab_stat_mean() %>%
  tab_pivot() %>% 
  set_caption("Car Stats") %>% 
  as_huxtable() %>% 
  set_top_padding(.2) %>%
  set_bottom_padding(.2) %>% 
  theme_article()
Ben
  • 1,113
  • 10
  • 26