From d55025267071806c4731e1e57ddad0ea9ae5d3fa Mon Sep 17 00:00:00 2001 From: kartikeya kirar Date: Fri, 15 Sep 2023 11:37:07 +0530 Subject: [PATCH] Update R/utils.R MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: André Veríssimo <211358+averissimo@users.noreply.github.com> Signed-off-by: kartikeya kirar --- R/utils.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/utils.R b/R/utils.R index 9042bb2e..abd7830a 100644 --- a/R/utils.R +++ b/R/utils.R @@ -149,6 +149,8 @@ to_flextable <- function(content) { ft <- flextable::width(ft, width = width_vector) } else if (inherits(content, "data.frame")) { ft <- flextable::flextable(content) + } else { + stop(paste0("Unsupported class `(", format(class(content)), ")` when exporting table") } ft <- custom_theme(ft)