How to create a more light Rmarkdown document

When I create a report in Rmarkdown if the source data has many rows then the report file size easily grows to 25 MB or more.

How can I delete from the Rmarkdown document all the objects are are not necessary for the final output but that make the html output too heavy?

1 Like

What is the size the data ?

With heavy data, there is an option to use self_contained = false and host the html document. With that you can use server side feature of DT for example.
You can also have plots in files and loads them when required instead of having them embeded in the html file directly.

all the objects are are not necessary

Have you examples of what you think is not necessary ?