I'm wanting to include the units in my column description for a kable table in R Markdown with html output. Basically for each cost I want 'Cost Min ($k)', 'Cost Mode ($k)' and 'Cost Max ($k)' as 3 of my column names.
It works fine for my first table but then for my second it is outputting it with strange formatting and not reading each column name correctly.
My code is as follows:
Summary<- matrix(c(0.90,0.99,1000,3000,5000,0.90,0.99,1000,3000,5000,0.30,0.60,500,750,1000), ncol=5,byrow=TRUE)
colnames(Summary)<-c("Probability Lower","Probability Upper" , "Cost Min ($k)" , "Cost Mode ($k)" , "Cost Max ($k)")
rownames(Summary)<-c("Start", "Current", "Target")
SummaryTable<-as.table(Summary)
knitr::kable(SummaryTable, format = "html") %>%
kableExtra::kable_styling(SummaryTable,bootstrap_options = "bordered")
Any help would be much appreciate as I would like all my tables to look like the one that is working.
Laura
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.