I currently have two side by side tables in an Rmarkdown file. See below. I want to add a totals row for the right column from the two data frames.
I am currently doing the following to make these two tables appear side by side when I knit my file to html
tr::kables(list(
kable(caption = "Promise Day Distribution", align=rep('l', 5),
step1_fix %>%
group_by(days) %>%
summarise(Orders = n_distinct(ID))
) %>% kable_styling(),
kable(caption = "Delivery Day Distribution", align=rep('l', 5),
step1_fix %>%
adorn_totals("row") %>%
group_by(days) %>%
summarise(Orders = n_distinct(ID))
) %>% kable_styling()
)
) %>% kable_styling()
How can I add grand totals into the code above? I tried to use adorn_totals() but I was recieving errors
I tried the adorn_totals()
to apped total row and column. Worked perfect (https://rdrr.io/cran/janitor/man/adorn_totals.html)