Reputation: 553
I have searched many places on how to place the whole table to the left but couldn't find a way except to set floating = FALSE
. The reproducible rmd file is as follows.
---
title: "test"
output: pdf_document
---
```{r}
library(pander)
panderOptions('table.alignment.default', 'left')
panderOptions('table.alignment.rownames', 'left')
pander(mtcars[1:4], caption = "a table")
```
The desired output is something like this:
Upvotes: 3
Views: 1249
Reputation: 395
With a small adjustment in the YAML header, your code should work (see daroczig's link):
---
title: "test"
output: pdf_document
header-includes:
- \usepackage[margins=raggedright]{floatrow}
---
```{r}
library(pander)
panderOptions('table.alignment.default', 'left')
panderOptions('table.alignment.rownames', 'left')
pander(mtcars[1:4], caption = "a table")
```
Upvotes: 0