From d1317bf7f4a0005d7d883a4bc5925123b27329b3 Mon Sep 17 00:00:00 2001 From: Davide Garolini Date: Thu, 5 Dec 2024 09:34:43 +0100 Subject: [PATCH] Update R/tt_as_df.R Co-authored-by: Emily de la Rua <59304861+edelarua@users.noreply.github.com> Signed-off-by: Davide Garolini --- R/tt_as_df.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/tt_as_df.R b/R/tt_as_df.R index fcbb235a1..3a29fe99a 100644 --- a/R/tt_as_df.R +++ b/R/tt_as_df.R @@ -250,7 +250,7 @@ as_result_df <- function(tt, spec = NULL, stat_name <- lapply(seq_along(stat_name), function(sn_i) { stat_name[[sn_i]][seq_len(necessary_stat_lengths[sn_i])] }) - stat_name[sapply(stat_name, function(x) length(x) == 0)] <- NA + stat_name[!nzchar(stat_name)] <- NA # unnesting stat_name and stat tmp_ret_by_col_i <- NULL