Chris Mendez in Data Science, For Developers, R

Create Interactive Charts using R and Shiny

Shiny is a package within R that helps data scientists and developers create interactive web applications. Are you a data scientist who knows R but can't figure out how React, Angular, or Vue JS? Then this is the framework for you.

How does Shiny Work?

Shiny borrows from the reactive programming paradigm where an application can keep track of its internal values and update itself when data changes. Think of it like a function that knows when it's value changes and when those values are modified, it re-executes itself.

Simple Example

Step 1 - Start R Console

First check if R is installed on your computer. If it's not, read this tutorial.

which r
r

Step 2 - Install Shiny

install.packages("shiny")

install-r-shiny

Step 3 - Load Shiny Library

You will always need to import the library before you can use Shiny.

library(shiny)

Step 4 - Run Demo

 runExample("01_hello")

install-r-shiny-demo


More Resources