I have this little table:
cases <- c("1182025", "+19525")
deceased <- c("7639", "+25")
TI_7 <- c(1100.395332, 0.0)
df <- data.frame(cases, deceased, TI_7)
If I kable it, the 0.0 in the third column should not appear.
If possible, the data type of the third column should remain numeric, otherwise decimal.mark = ',' does not work.
This is how I kable:
kbl(df, format.args = list(decimal.mark = ',', digits=6), align = "rccc") %>%
kable_paper(bootstrap_options = "striped", full_width = F, position = "left")
I tried it with gsub, but then all the 0s disappear, inside the numbers too.
With other functions the data type changes to unknown.
