Can I separate table content per year using library formattable?

18 Views Asked by At

Im using this code to create a visual table of main causes of x problem in a 4 year lapse.

specificRows <- subset(mainDF, select = "Cause")
Catalogue <- merge(specificRows, Catalogue, by.x = "Cause", by.y = "idCause")

Catalogue <- tabyl(Catalogue, Clasification)
Catalogue <- Catalogue[order(-Catalogue$n), ]
cat$Percentage <- round((cat$Percentage* 100), 2)

nice_table(
  Catalogue,
  highlight = TRUE,
  title = c("Table Title"),
  note = "Table Note",
)

I'd like to know if it is possible to create subdivisions within the table as to show main causes per each of these 4 years.

Thank you!

I haven't tried anything different, but I also haven't found solutions online or with friends who use R.

An alternative would be manually creating the tables on word or something, but I'd like to know if I can avoid that!

0

There are 0 best solutions below