Fix bugs in remove_column
diff --git a/R/collapse_rows.R b/R/collapse_rows.R
index 5491529..96769be 100644
--- a/R/collapse_rows.R
+++ b/R/collapse_rows.R
@@ -82,7 +82,6 @@
     kable_dt <- kable_dt[-(1:kable_attrs$header_above),]
     names(kable_dt) <- kable_dt_col_names
   }
-  # kable_dt$row_id <- seq(nrow(kable_dt))
   collapse_matrix <- collapse_row_matrix(kable_dt, columns, target = target)
 
   for (i in 1:nrow(collapse_matrix)) {
@@ -107,6 +106,7 @@
   }
 
   out <- as_kable_xml(kable_xml)
+  kable_attrs$collapse_matrix <- collapse_matrix
   attributes(out) <- kable_attrs
   if (!"kableExtra" %in% class(out)) class(out) <- c("kableExtra", class(out))
   return(out)