0

I have three dataframes and I want to convert each one to its own html and then display them one of top of the other, each with their own captions.

I am using xtable and htmlTable to create a single table, but I can't figure out how to join them all one of top of each other in a single output.

Suggestions?

uncian
  • 25
  • 3
  • It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. Is this with shiny or rmarkdown or something? – MrFlick Nov 27 '18 at 20:43
  • I have two dataframes let call them dfa and dfb, simple numeric data 5 columns two rows. And im using print(xtable(dfa), file = "dfa.html", type = "html", include.rownames = FALSE) and print(xtable(dfb), file = "dfa.html", type = "html", include.rownames = FALSE). I want a a single html file with the dfa and dfb tables stacked on top of each other. – uncian Nov 27 '18 at 21:11

1 Answers1

0

Just use append=TRUE when writing the second table to the file

print(xtable(iris), file = "df.html", type = "html", include.rownames = FALSE)
print(xtable(iris), file = "df.html", append=TRUE, type = "html", include.rownames = FALSE)
MrFlick
  • 195,160
  • 17
  • 277
  • 295