0

From this: https://glin.github.io/reactable/articles/examples.html#nested-tables

I have a nested table. I want to add another nested table within that. How do I do that?

library(tidyverse)
library(reactable)
df <- CO2 %>%  mutate(Planet = rep("Earth"))
df1 <- unique(df[, c("Plant", "Type")])

reactable(df1, details = function(index) {
  plant_data <- df[df$Plant == data$Plant[index], ]
  reactable(plant_data, outlined = TRUE)
  })

Currently, the top level data has Plant and Type for columns. When I click the arrow button next to a row, I can expand that row to show more information (Plant, Type, Treatment, conc, uptake, Planet). I want to be able to click another arrow for Treatment and show Planet.

OTA
  • 269
  • 2
  • 17

0 Answers0