Formattable: How to create a super column with several sub-columns under in R?

28 Views Asked by At

I am trying to create a table using formattable with a super column and several sub-columns. Right now, I was able to create two columns for variable_units and site. But I would like to move site (as a super column) above the two minimum time columns. How do I do that?

enter image description here

I only managed to get this far and the code is still not working.

 min_time.table <- formattable(
  variable.min.2,
  align = c("l", "l", "l"),
  list(
    area(col = "Site") ~ " ",
    area(col = "Minimum_Years_80_Correct") ~ normalize_bar('pink', max = 100),
    area(col = "Minimum_Years_100_Correct") ~ normalize_bar('pink', max = 100)
  )
)
0

There are 0 best solutions below