How to add two sub-columns in one (Concat) using datatable (DT) in R Markdown/Shiny?
How to add two sub-columns in one (Concat) using datatable (DT) in R Markdown/Shiny?
I would like to see two columns in one using DT package.
Example:
Score
Count of scores Sum of scores
I am rendering the table from Markdown:
renderDataTable({
DT::datatable(
I would appreciate any help.
Thanks.
This discussion has been closed.
Answers
You would use the
rowparameter ofcolumns.renderto access different data in the row.Kevin
Hi,
Thank you for letting me know. I was not able to create the reprex in R so I have created in Excel and pasted here. Please let me know if you don't understand. (see below image)
`

`
This is how I wanted to create a table in R Markdown using datatable package. Is it possible to do that? or is there any other package to create a table exactly the same.
Thanks.
Hi @bharath222 ,
From that image, it looks like a normal table, with a double row header - the top row with a colspan, and the second without. If so, this example here should help,
Cheers,
Colin
Thank you for the link. I am able to get it.