Search code examples
rkablekableextra

kable: obtain from a list of dataframe tables on top of each other instead of next to each other


i have a nested list of data.frame that i need to export in html. I am using kable and writeLines:

kable(list_of_df) %>% writeLines("output.html")

Which results in something like this:

A   B   C   A   B   C       
1   2   3   x   y   z
4   5   6   x   y   z   
7   8   9   x   y   z

Unfortunately, I am not able to figure out how to automatically place the tables on top of each other instead of next to each other.

Any help is appreciated.


Solution

  • Easier than I thought

    map(list_of_df,kable) %>% as.character() %>% writeLines("out.html")