I am creating rowsum of the table like below. I want to remove the rowsum of the last column of the table.
mytable
A B C
a1 22 33
b1 12 10
Total 34 43
My code to generate rowsums
library(dplyr)
library(formattable)
mytable <- mytable %>%
arrange(rowSums(is.na(.))) %>%
adorn_totals("row") %>%
formattable()
I want to replace last column of the row Total (in this case value 43) with "-". i tried
last_row <- tail(mytable, n=1)
last(last_row) <- "-"

Note that with this, your
Ccolumn is no longer a number:Data