SherlockML supports building R Shiny
applications. R Shiny offers a flexible interface for building
interactive dashboards entirely in R (you don’t need to write any
JavaScript). The Shiny gallery has
some great examples of dashboards, and the shiny-examples repository on github for many more that can be used as
starting point for your own app.

Note that is important that the file be called app.R for shiny-server
to recognise it.

This code defines an application that will compute k-means clusters of the Iris
data, allowing the user which features to use for the clustering and how many
clusters to use.

To preview your app, simply click on “Run App” in the top right of your code
pane in Rstudio.

By clicking on the dropdown arrow to the right of “Run App”, you can choose to
preview your app in the Rstudio viewer pane, to open the app in a pop-up
window, or to open the app in your browser. On SherlockML the last two are
broadly the same, though if you elect to view in a pop-up window you may need
to configure your browser to allow pop-ups from SherlockML.

You have now developed a great dashboard, and you want to let other
members of your project access it. SherlockML supports hosting R Shiny
applications. Head to the Apps tab in SherlockML, click New,
followed by R Shiny. You will be prompted to enter a name for your
app.

Choose a name and click Create App. You will then be taken to the App settings page.

You will need to make the following changes to the application settings:

Change the APP DIRECTORY to /project/iris-kmeans.

Save your application by clicking the Save button, then click Start app
to actually start your server. After a few seconds, you will
see the status of your app change to Running. At this point, a URL
will appear. Select that URL and place it in your browser search bar.
You will be taken to the application! Behind the scenes, SherlockML verifies
that you are an observer in the project that the app belongs to.