Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

98
Views
Expandable/Collapsible rows for datatable in R Shiny

I'm trying to build something like a sales report where country-level sales aggregate to regional level and can be seen through expand/collapse button at the regional rows. For example if I have a table like: enter image description here

Then I want a resulting starting table to be

enter image description here

and i can click on a button next to "North America" to see the country-level details below.

It seems like the only way to do it in Shiny is through datatable and manipulating the callback functions, which require quite a bit of javascript knowledge (that I don't have). I did find another answer posted here that got me started. But there are still some key differences that I wasn't able to figure out (for example, showing both top-level label AND the top-level sales data at the same time, as opposed to only showing the top-level label in the other answer).

Could anyone give some advice on how to go about this? Any help would be greatly appreciated!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!