Book Image

Learning Shiny

By : Hernan Resnizky
Book Image

Learning Shiny

By: Hernan Resnizky

Overview of this book

Table of Contents (19 chapters)
Learning Shiny
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Introducing R, RStudio, and Shiny
Index

Running a Shiny web application


In order to run a Shiny web application, it is important to consider that UI.R, server.R, and, if needed, global.R must be placed in the same folder. If an HTML document is used, a folder named www must be created in the application folder to hold the HTML document. Additionally, it must be named index.html.

There are three basic ways to run the applications. They are as follows:

  • runApp(): This opens a browser and executes the application locally. It receives a string representing a directory as an argument. If no argument is provided, runApp() defaults to the working directory.

  • runGist()/runGitHub(): This works exactly as runApp(), but instead of looking for the files locally, it connects to a gist or a GitHub repository, downloads the full application in a temporary file, and displays it in a web browser. This is explained in more detail in Chapter 10, Sharing Applications.

  • URL: The web application is accessible to anyone that has the URL where it is located...