1

I'm preparing some lecture slides using the rmarkdown / knitr / beamer chain in RStudio. I would like to walk through the output of a summary(fit) call, but the output extends off the slide (even if I make the font size very small as in this answer).

The solution I've come up with is to capture the output of summary as a list, then print those outputs I'm interested in consecutively:

```{r, echo=TRUE, results='hide'}
summary(fit)
```


```{r, echo=FALSE}
out <- summary(fit)
```

```{r, echo=FALSE}
out$call
```

Is there a better way?

CL.
  • 14,577
  • 5
  • 46
  • 73
tsawallis
  • 1,035
  • 4
  • 13
  • 26
  • 1
    What about `allowframebreaks` to break up the summary automatically? [Here](http://stackoverflow.com/a/35681531/2706569) scoa explains how to apply this in rmarkdown. – CL. Nov 30 '16 at 09:33

1 Answers1

2

Check out the DT package. DT interfaces with the DataTable.Js library enabling print HTML widget datatables with pagination.

If you aren't viewing the deck from a browser (PDF or .doc) then you can export the plot and embed it in the document as desired - manually or script.

irJERAD
  • 590
  • 5
  • 6