Hao Zhu | 2623412 | 2017-02-22 15:34:33 -0500 | [diff] [blame^] | 1 | #' Add an extra header row above the current header |
| 2 | #' @export |
| 3 | htmlTable_add_header_above <- function(kable_input, header = NULL) { |
| 4 | if (is.null(header)) return(kable_input) |
| 5 | kable_xml <- read_xml(as.character(kable_input), options = c("COMPACT")) |
| 6 | kable_xml_thead <- xml_child(kable_xml, "thead") |
| 7 | |
| 8 | |
| 9 | x <- read_xml("<parent><child>1</child><child>2<child>3</child></child></parent>") |
| 10 | children <- xml_children(x) |
| 11 | t1 <- children[[1]] |
| 12 | t2 <- children[[2]] |
| 13 | t3 <- xml_children(children[[2]])[[1]] |
| 14 | |
| 15 | |
| 16 | } |