| Hao Zhu | 76f0eb6 | 2018-09-15 12:38:33 -0400 | [diff] [blame] | 1 | % Generated by roxygen2: do not edit by hand | 
 | 2 | % Please edit documentation in R/xtable2kable.R | 
 | 3 | \name{xtable2kable} | 
 | 4 | \alias{xtable2kable} | 
 | 5 | \title{Convert xtable to a kable object} | 
 | 6 | \usage{ | 
 | 7 | xtable2kable(x, ...) | 
 | 8 | } | 
 | 9 | \arguments{ | 
 | 10 | \item{x}{an xtable object} | 
 | 11 |  | 
 | 12 | \item{...}{options for print.xtable} | 
 | 13 | } | 
 | 14 | \description{ | 
 | 15 | This function allow users to turn an xtable object into a kable | 
 | 16 | so they can use most of kableExtra's functions with their xtable code without | 
 | 17 | making too many changes. Note that although I tested many cases and it seems | 
 | 18 | to work, this function may not be functional in some other cases. I'm not | 
 | 19 | a regular xtable user and can only provide very limited support for this | 
 | 20 | function. | 
 | 21 |  | 
 | 22 | You should use this table in the same way as \code{print.xtable}. All the options | 
 | 23 | you provided to this function will be sent to \code{print.xtable}. Instead of | 
 | 24 | printing out the result, this function will return the LaTeX or HTML as | 
 | 25 | text and a kable object. | 
 | 26 | } | 
 | 27 | \examples{ | 
 | 28 | \dontrun{ | 
 | 29 | library(xtable) | 
 | 30 | xtable(mtcars) \%>\% | 
 | 31 |   xtable2kable(booktabs = TRUE) \%>\% | 
 | 32 |   kable_styling(latex_options = "striped") | 
 | 33 | } | 
 | 34 |  | 
 | 35 | } |