Embedding a HTML table in R Markdown

Hello Community,

I need your help with something, let me first show you a screenshot:

As you can see there are two identical table, the first is displayed using the image link

![]("activity_tableSQL.html")

The second one is displayed using the function:

htmltools::includeHTML("activity_tableSQL.html")

I want to embed the html table instead of displaying it as an image link but when I use the second function, the table overlaps and displays all 100 records (see screenshot). So how can I embed the table and make sure it fits the screen-width like the image link above?

Any assistance will be very much appreciated :slight_smile: I hope you understand what I'm trying to ask

You could probably use CSS to set the width, overflows, etc directly in your HTML table

@alvarosg Thank you so much for your reply, this actually worked by using overflows. I don't know why I didn't think about that lol :sweat_smile:

@Saiint Maybe you can test library gt for better tables.

https://gt.rstudio.com/articles/gt.html

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.