Advertisement
Guest User

Untitled

a guest
Jan 29th, 2018
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. ---
  2. title: "sample"
  3. output: pdf_document
  4. header-includes:
  5. - \usepackage{booktabs}
  6. ---
  7.  
  8. ```{r global_options, R.options=knitr::opts_chunk$set(warning=FALSE, message=FALSE)}
  9. ```
  10.  
  11.  
  12. ```{r sample, echo=FALSE, results='asis'}
  13. library(knitr)
  14. library(xtable)
  15.  
  16. t1 <- kable(head(mtcars)[1:3], format = "latex", booktabs = TRUE)
  17. t2 <- kable(head(mtcars)[4:6], format = "latex", booktabs = TRUE)
  18.  
  19. ```
  20.  
  21. \begin{table}[!htb]
  22. \begin{minipage}{.5\linewidth}
  23. \caption{}
  24. \centering,
  25. `r t1`,
  26. \end{minipage}%
  27. \begin{minipage}{.5\linewidth}
  28. \centering
  29. \caption{},
  30. `r t2`,
  31. \end{minipage}
  32. \end{table}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement