1

How do I increase the width of an apa_table in R Markdown. I'm using the papaja package. I would like the width to be long enough to fit the table's title.

This is the code I'm using for my tables:

```{r '1996 - 1997 Count Matrix',echo=FALSE, message=FALSE, warning=FALSE, results="asis"}

apa_table(count_transition_matrix_9697,
      caption = "One-Period Short Ratings Transition Count Matrix, 1996 - 1997",
      align = c("c"),
      added_stub_head = "Period 1 Short Ratings",
      col_spanners = list(`Period 2 Short Ratings` = c(2,7)   
      ))
```

And the output looks like this:

enter image description here

I've tried including "fig.width" in the r chunk but that doesn't work. Any guidnace would be apreciated.

Community
  • 1
  • 1
gm007
  • 547
  • 4
  • 11
  • Hi @gm007, there currently is no way to adjust the width of the table. It is sized to fit its contents. For what it's worth, it's common for table titles to span multiple lines. – crsh Aug 31 '18 at 08:32
  • @crsh That's unfortunate but thank you for letting me know. – gm007 Sep 04 '18 at 16:30

1 Answers1

0

Very late to this party (still looking for a better solution myself) but I think you could now increase the table width manually by setting the width of the columns using the align argument:

apa_table(
.
.
align = c("m{5cm}", rep("m{2}", 6),
.
.
)
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103