Resizing a star table in Knitr

I put together a document using knitr, and while most of the document looks good, there is one regression table that is too wide to fit on the page without any changes.

The regression table is generated using stargazer and is quite wide.

I tried resizing the whole fragment as follows:

{r, echo=FALSE, resize.width=10, results='asis'}

stargazer( table...)

but no luck in making the resized. Is there something I'm doing wrong, is it not possible to resize these asterisk tables via the chunk options?

Thanks!

+2
source share
1 answer

You can use the .css file to resize the output.

in yaml add:

---
output: 
html_document:
    css: custom.css
---

custom.css :

table {
  width: 100%;  
} 

custom.css , .

0

Source: https://habr.com/ru/post/1605990/


All Articles