Hao Zhu | 37975a3 | 2019-01-15 14:59:34 -0600 | [diff] [blame] | 1 | #' Read HTML kable as XML |
| 2 | #' |
| 3 | #' @description This function will read kable as a xml file |
| 4 | #' |
| 5 | #' @param x kable or kableExtra object |
| 6 | #' |
| 7 | #' @export |
| 8 | kable_as_xml <- function(x) { |
| 9 | read_kable_as_xml(x) |
| 10 | } |
| 11 | |
| 12 | #' Convert XML back to kable |
| 13 | #' |
| 14 | #' @description Convert XML back to kable |
| 15 | #' |
| 16 | #' @param x XML table object |
| 17 | #' |
| 18 | #' @export |
| 19 | xml_as_kable <- function(x) { |
Hao Zhu | 84102ed | 2019-01-16 00:06:25 -0600 | [diff] [blame] | 20 | out <- as_kable_xml(x) |
| 21 | class(out) <- "kableExtra" |
| 22 | return(out) |
Hao Zhu | 37975a3 | 2019-01-15 14:59:34 -0600 | [diff] [blame] | 23 | } |