View source: R/prettySessionInfo.R
prettySessionInfo | R Documentation |
Wraps the session information output chunk in a collapsible HTML element so that it doesn't dominate the compiled chapter.
prettySessionInfo()
Prints a HTML block containing a collapsible section with session information.
Aaron Lun
setupHTML
and chapterPreamble
, to set up the code for the collapsible element.
tmp <- tempfile(fileext=".Rmd")
write(file=tmp, "```{r, echo=FALSE, results='asis'}
rebook::setupHTML()
```
```{r, results='asis'}
prettySessionInfo()
```")
rmarkdown::render(tmp)
if (interactive()) browseURL(sub(".Rmd$", ".html", tmp))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.