Rotate a table from R markdown in pdf

前端 未结 3 1374
暗喜
暗喜 2021-01-04 00:28

I\'m writing in R Markdown and have a contingency table that is quite wide. I am converting the R markdown document to a PDF using pandoc.

Is it possible to rotate o

3条回答
  •  独厮守ぢ
    2021-01-04 01:28

    You can add some LATEX code in your Rmd file :

    \usepackage{lscape}
    \usepackage{pdfpages}
    
    Some text on a portrait page.
    
    \newpage
    \blandscape
    
    ## Title, lorem ipsum
    
    ```{r, results = "asis"}
    kable(iris[1:5,], caption = "Lorem again")
    ```
    Lorem ipsum...
    
    \elandscape
    
    Some other text on a portrait page.
    

提交回复
热议问题