Introduction

Another great feature of RStudio is that you can create dynamic visualizations using R Shiny. Dynamic graphics allow a user to select parameters that change the visualization in some way. Graphics will update in real-time within a web browser.


Example

Recall earlier how we created the figure below using plot() function:



This figure is great and all, but what it would be a better learning exercise if the individual could manipulate the values.

Take a look at this example to illustrate Central Tendency and Dispersion.


Render Functions

Shiny functions work similar to other knitr functions that are used to convert your raw R output into HTML, PDF, Word, etc. documents. The output functions take R code and “render” it as HTML objects that can be used in web browsers in order to display your dashboard. Shiny functions add some javascript features that allow output to be updated in real-time inside a browser.

These functions are converting R code into javascript. There are a number of pre-built “widgets” available in the Shiny website.


Questions?



Back to R Workshop page


Please report any needed corrections to the Issues page. Thanks!



Last updated 13 August, 2024