Resize stargarzer table when type = HTML for ioslides in RStudio

I am new to using R Markdown to create slide presentations in RStudio. I could not find anything on the Internet that relates to my specific question. It was close , but I had the opposite problem, i.e. I am tyring to compress stargazer HTML output for installation on a single slide. This question is basically the same, but no answers yet. Any ideas? Here is a stylized example of my markup code:

---
title: "test"
author: "Scott Murff"
date: "September 4, 2015"
output: ioslides_presentation
---

## Slide with R Code and Output

```{r, echo=FALSE, results='asis', eval=TRUE, warning=FALSE, message=FALSE}
library(stargazer)
data<-data.frame(y=rnorm(30),x1=rnorm(30), x2=rnorm(30), x3=rnorm(30), x4=rnorm(30))
fit1<-lm(y~x1,data)
fit2<-lm(y~x2,data)
fit3<-lm(y~x3,data)
fit4<-lm(y~x4,data)


stargazer(fit1, fit2, fit3, fit4, type='html')
```
+4
source share
1 answer

stargazer, :

  • smaller, {.smaller} :

    ## your slide title {.smaller}

: http://rmarkdown.rstudio.com/ioslides_presentation_format.html#visual-appearance

, .flexbox .vcenter:

## your slide title {.smaller .flexbox .vcenter}

: http://rmarkdown.rstudio.com/ioslides_presentation_format.html#advanced-layout

.

2. css:

YAML add:

---
output:
  ioslides_presentation:
    css: styles.css
---

styles.css( ) :

.reduced{
   font-size: 0.8em;
}

, :

## your slide title {.reduced}

: http://rmarkdown.rstudio.com/ioslides_presentation_format.html#visual-appearance CSS

html - , css .

stargazer, single.row=TRUE omit.table.layout, .

+2

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


All Articles