Pregunta

I am looking for a solution to expand the width of code chunks in an markdown presentation compiled with RStudio. Those knitr options doesnt seem to work :(

```{r, eval=FALSE,fig.width=100}
grid <- seq(0,1,0.00001)
L <- (factorial(n)/(factorial(k)*factorial(n-k))) * grid^k*(1-grid)^(n-k)
```

If I open the presentation, the code chunk above is splitted after "L <-". The rest of the code moves in the next line. Any ideas?

¿Fue útil?

Solución

You can go a few ways. First you can use width:##### and height:##### in the frontmatter to specify a custom max height/width for your whole presentation.

You could also use a custom css file (e.g. css: mypres.css) where you modify the .reveal pre and .reveal code .r and (perhaps) the .reveal .slides CSS styles to fit your needs.

Smaller text == harder to read on a big screen. Wider box == might not fit well on a big screen.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top