Serve an R Markdown Document Using servr

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown, see https://rmarkdown.rstudio.com. This document can be compiled by either R Markdown v1 or v2, and you can serve it by either servr::rmdv1 or servr::rmdv2 accordingly.

You can include an R code chunk:

if (TRUE) {
  1 + 1
}
rnorm(10)
summary(cars)
knitr::kable(head(mtcars))

You can also embed plots, for example:

plot(cars, pch = 20, col = 'red')

After you start servr for this document, you can click example.html to view it, then edit and save this R Markdown document, and you will see the HTML output file is automatically reloaded in your browser.

servr::serve_example('rmd', servr::rmdv1)
# or
servr::serve_example('rmd', servr::rmdv2)

Session info:

sessionInfo()


Try the servr package in your browser

Any scripts or data that you put into this service are public.

servr documentation built on Oct. 5, 2024, 1:06 a.m.