0

I try to have a nive list and sublist of item to display in R (possibly collapsible) as the kind of thing we could have in a pivot table in Excel. Is there a way to do it with the package DT for example?

The final result should look like this table with item and sub items.

Romain
  • 440
  • 4
  • 17
  • Please read [this](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) and revise your question. Some data snippets, your expected output and what you tried so far is always useful. – Roman Apr 28 '16 at 13:06
  • Please see this related question for a more conform question: http://stackoverflow.com/questions/42831836/using-rowsgroup-in-shiny-dt Thank you – Romain Mar 20 '17 at 08:36

1 Answers1

0

I suggest using rpivoTable functionalities.

rpivotTable(data, rows = NULL, cols = NULL, aggregatorName = NULL,
  vals = NULL, rendererName = NULL, sorter = NULL, exclusions = NULL,
  inclusions = NULL, ..., width = NULL, height = NULL)
MPaydar
  • 71
  • 1
  • 5
  • Thank you for your suggestion. Nevertheless, I know rpivoTable and it is lacking some of the DT nice feature such as: ordering, copy/past button, conditional formatting, columns formatting etc... This is not what I am looking for here. – Romain Mar 20 '17 at 08:31
  • No unfortunately not. I am currently working on this possible solution but I didn't manage to make it work for the moment. Any suggestion are welcome. http://stackoverflow.com/questions/42831836/using-rowsgroup-in-shiny-dt – Romain Mar 22 '17 at 10:21
  • Take a look at my post, I am very close, only have a strange issue: http://stackoverflow.com/questions/42933859/how-to-add-totals-to-a-dtdatatable – MPaydar Mar 22 '17 at 14:58
  • Version 0.2.0 of `rpivotTable` now on Cran has ability to order rows and columns. – Enzo Apr 19 '17 at 23:07