HTML
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
.gitignore
README.md
app.png
teaching-shiny.Rmd
teaching-shiny.html

README.md

Teaching Shiny with Knitr and Webshot

This repository is meant to illustrate a strategy for sharing R code for a Shiny application while also documenting that code and showing a screenshot for the resulting app. For more information see this blog post.

Running this example

# First make sure you have shiny, knitr, and webshot installed:

install.packages(c("shiny", "knitr", "webshot"))

# Then knit teaching-shiny.Rmd:

knitr::knit("teaching-shiny.Rmd")

# Take a look at teaching-shiny.html:

browseURL("teaching-shiny.html")

# Now change something in app/ui.R and knit the document again:

knitr::knit("teaching-shiny.Rmd")
browseURL("teaching-shiny.html")

# As you can see by changing just the source code for the app the resulting
# html and screenshot of the app changed.

To run the app itself:

shiny::runGitHub("seankross/teaching-shiny", subdir = "app"

License

CC0