From efa4ae7cd6ec9b769d824b85c2ca32cfe9cbe895 Mon Sep 17 00:00:00 2001 From: Vincent Arel-Bundock Date: Thu, 15 Feb 2024 16:42:17 -0500 Subject: [PATCH] simplification --- R/toTinytable.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/toTinytable.R b/R/toTinytable.R index 6af20d7..7ee5985 100644 --- a/R/toTinytable.R +++ b/R/toTinytable.R @@ -58,7 +58,8 @@ toTinytable <- function(table, ...) { # entries in the first row of clabels are already colnames in out if (nrow(clabels) > 1) { spans <- rev(apply(clabels, 1, get_span)[1:(nrow(clabels) - 1)]) - for (s in spans) { + for (i in (nrow(clabels) - 1):1) { + s <- get_span(clabels[i,]) out <- tinytable::group_tt(out, j = s) } }