O'Reilly logo

Web Application Development with R Using Shiny - Second Edition by Chris Beeley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A minimal HTML interface

Now that we have dipped our toes into HTML, let's build a (nearly) minimal example of an interface entirely in HTML. To use your own HTML in a Shiny application, create the server.R file as you normally would. Then, instead of a ui.R file, create a folder named www and place a file named index.html inside this folder. This is where you will define your interface.

index.html

Let's look at each chunk of index.html in turn:

<!-----------------------------> <!--Minimal example- HTML UI --> <!-----------------------------> <html> <head> <title>HTML minimal example</title> <script src="shared/jquery.js" type="text/javascript"></script> <script src="shared/shiny.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required