Search code examples
rxtable

Multiple dataframes to multiple html tables but all displayed one after the other


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?


Solution

  • 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)