How to add two sub-columns in one (Concat) using datatable (DT) in R Markdown/Shiny?

rmarkdown
shiny
rstudio
datatable
dt

#1

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.


#2

Hi @bharath222: It's hard to understand what you are trying to accomplish without providing a reproducible example (a.k.a. reprex). I've provided a couple links discussing what a reprex is and tips for creating them.

https://www.tidyverse.org/help/


#3

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)

image

This is how I wanted to create a table in Shiny using DT package. Is it possible to do that? or is there any other package to create a table exactly the same.

Thanks.


#4

I found the solution here: https://rstudio.github.io/DT/