standardize attr pipes
diff --git a/R/add_header_above.R b/R/add_header_above.R
index 90d018a..29ab6d7 100644
--- a/R/add_header_above.R
+++ b/R/add_header_above.R
@@ -35,7 +35,7 @@
# HTML
htmlTable_add_header_above <- function(kable_input, header = NULL) {
if (is.null(header)) return(kable_input)
- table_info <- magic_mirror(kable_input)
+ kable_attrs <- attributes(kable_input)
kable_xml <- read_xml(as.character(kable_input), options = c("COMPACT"))
kable_xml_thead <- xml_tpart(kable_xml, "thead")
@@ -53,7 +53,7 @@
xml_add_child(kable_xml_thead, new_header_row, .where = 0)
out <- structure(as.character(kable_xml), format = "html",
class = "knitr_kable")
- attr(out, "original_kable_meta") <- table_info
+ attributes(out) <- kable_attrs
return(out)
}
diff --git a/R/kable_styling.R b/R/kable_styling.R
index 98e6039..5460bfa 100644
--- a/R/kable_styling.R
+++ b/R/kable_styling.R
@@ -100,7 +100,7 @@
position = c("center", "left", "right",
"float_left", "float_right"),
font_size = NULL) {
- table_info <- magic_mirror(kable_input)
+ kable_attrs <- attributes(kable_input)
kable_xml <- read_xml(as.character(kable_input), options = c("COMPACT"))
# Modify class
@@ -158,7 +158,7 @@
out <- structure(as.character(kable_xml), format = "html",
class = "knitr_kable")
- attr(out, "original_kable_meta") <- table_info
+ attributes(out) <- kable_attrs
return(out)
}
diff --git a/R/row_spec.R b/R/row_spec.R
index c19044c..1e12327 100644
--- a/R/row_spec.R
+++ b/R/row_spec.R
@@ -5,7 +5,8 @@
#' italic text.
#'
#' @param kable_input Output of `knitr::kable()` with `format` specified
-#' @param row A numeric value indicating which row to be selected
+#' @param row A numeric value indicating which row to be selected. You don't
+#' need to count in header rows or group labeling rows.
#' @param bold A T/F value to control whether the text of the selected row
#' need to be bolded.
#' @param italic A T/F value to control whether the text of the selected row