commit | 16c2f9e01e10c0ebe27fae939e016be2f013088f | [log] [tgz] |
---|---|---|
author | Hao Zhu <haozhu233@gmail.com> | Tue Oct 17 19:47:42 2017 -0400 |
committer | Hao Zhu <haozhu233@gmail.com> | Tue Oct 17 19:47:42 2017 -0400 |
tree | bbfd60b8f6d09996da1e9375aba5fd19534b4f11 | |
parent | 064990df5b0001d4aa48bb6780d8e4c77807e297 [diff] |
Improve method so it's 200% faster when there are many many rows
diff --git a/R/util.R b/R/util.R index f63e0c0..f201bda 100644 --- a/R/util.R +++ b/R/util.R
@@ -124,7 +124,7 @@ empty_times <- dup_index[i] - 1 new_row <- str_replace( dup_row, "&", - paste(c("&", rep("\\\\\\\\empty", empty_times)), collapse = "")) + paste0("&\\\\\\\\vphantom\\\\{", empty_times, "\\\\}")) kable_input <- str_replace(kable_input, dup_row, new_row) table_info$contents[i] <- new_row }