CyVerse_logo

|Home_Icon|_ Learning Center Home

Shiny

Shiny is an R-based web application for interactive data analysis, exploration and visualization. It was built to execute R code dynamically based on user input. Since most JavaScript code is autogenerated by the environment, basic R scripting knowledge is sufficient for Shiny apps.

For running a Shiny App in CyVerse Discovery Environment, you need app.R script/file. The following are steps for running an example Rshiny App (mpg) that is available on the Rstudio site within the Discovery Environment.

1. Find your Rshiny app

Navigate to Rstudio github to find the Rshiny app that you are interested in. Here is an example of one such Rshiny app that we will be using to run in the DE.

shiny1-1

2. Find the app.R script

Inside the folder for mpg you will find the app.R file. Click on the Raw button and then copy the contents of the app.R file

shiny1-2

3. Log-in to CyVerse DE

Next, login to CyVerse DE. Click on the Data window and create a folder rshiny-mpg specific for the app

shiny1-3

shiny1-4

4. Create new app.R script in DE

Under File menu, click the New R Script app.R, paste the contents and name it as app.R

shiny1-5

shiny1-6

5. Search Rshiny app

The Rshiny app can be launched by first searching for Rshiny app in the search bar in the Apps window

shiny1-7

6. Select the app.R script

Under Input files of the app, click the “add” button and then select the app.R file that you created earlier

shiny1-8

7. Launch Rshiny App

After you select the app.R file, launch the Rshiny app by clicking launch analysis

shiny1-9

9. Cancel your analysis

Cancel your analysis by clicking the Analysis window, then select the Rshiny analysis and click Cancel Analysis option under “Analyses” button

shiny1-12

shiny1-13

References/Tutorials


Fix or improve this documentation: