O'Reilly logo

R Data Analysis Cookbook - Second Edition by Kuntal Ganguly

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

Creating a single-file web application

In R 3.0.0 version or higher, a shiny application can include just a single app.R file in a separate folder along with any needed data files and dependent R source code files. Create a new SingleFileApp folder and save the downloaded app.R here. Take a look at the downloaded app.R file and start the application by entering the runApp("SingleFileApp") command.

In app.R, the shinyApp(ui = ui, server = server) line is executed first by R. This shinyApp function returns an object of the shiny.appobj class to the console. When this object is printed, the shiny app is launched in a separate window.

It is possible to create a single-file Shiny application without a specific application directory and with a ...

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