From bacdf88fa4f871eb7d52ecd63a0e8e5ae1878ce2 Mon Sep 17 00:00:00 2001 From: Sam Firke Date: Mon, 22 May 2017 13:56:20 -0400 Subject: [PATCH] remove unnecessary as.character call from adorn_totals("row") closes #118 --- R/add_totals.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/add_totals.R b/R/add_totals.R index 5efca1d9..624a56b4 100644 --- a/R/add_totals.R +++ b/R/add_totals.R @@ -35,8 +35,8 @@ adorn_totals <- function(dat, which = c("row", "col"), fill = "-", na.rm = TRUE) col_totals[nrow(col_totals), 1] <- "Total" # replace final row, first column with "Total" dat <- dplyr::bind_rows(dat %>% - stats::setNames(names(dat)) %>% - dplyr::mutate_at(1, as.character), col_totals) + stats::setNames(names(dat)), + col_totals) } if("col" %in% which){