0

I wish to create an interactive html page with data I manipulate in R. So far, I've created a NVD3 chart with the rChart package and output in in html via knitr package without any issue.

Now, I want to create a table with dynamic content in this page. I've been looking at options to integrate it, such as the table template of rCharts, the package DT, but none of these options seems to provide the flexibility I am looking for.

I found exactly the template I am looking for on this page, as it has a native modal display I did not found anywhere else. https://datatables.net/extensions/responsive/examples/display-types/jqueryui-modal.html. This provides Javascript and HTML to use to initialise the table but I have no clue how to use it with my R data.

I there a way to integrate this table via R package + knitr ? Can the shiny suite help me here ?

Thanks for your help.

carlic
  • 21
  • 2
  • can u explain what features you are looking for that are not included in here: https://rstudio.github.io/DT/. The popups? – Tonio Liebrand Feb 19 '17 at 14:30
  • Yes exactly, ideally I would like a table with row grouping feature and a pop-up option, but the template from the datatables.net website looks good enough – carlic Feb 19 '17 at 16:05

1 Answers1

0

Take another look at DT. I use it all the time and it will do what you want there. It has a search bar, allows you to select the number of rows to show with a dropdown, will index the pages of rows at the bottom right.

You can change the font, you can alternate white and tinted rows, change row height, colors and structures all you want.

Look here to see some of the ways to build in full css styling

The only thing that I see on that page I am not sure you can do is add the green dot.

But this link in the stacks tells you how to add hover_over functionality.

hover-over

And here is a link to a post I made with some tweaks to the CSS as examples:

Changing row-height and drop-down configurations

You will need to play with the formatting using css and the code structure listed at the github page, but you should be able to do what you want if that table is really your ideal (except for the dot- but likely the function contained in the dot is available with some work)

Community
  • 1
  • 1
sconfluentus
  • 4,693
  • 1
  • 21
  • 40
  • thanks for your help ! I still have a lot of questions on related topic but I'll create dedicated post for this :) – carlic Feb 26 '17 at 15:47