This is a three part shiny app talk series. Use k means clustering as an example

  • You need to write a ui function, server function and shinyApp function to invoke the app

  • Build your app in terms of inputs and outputs

  • Every input should have inputId, label, and additional arguments that does its job

  • Use three rules for building Ouput

  • save the output to output$samenameinui

  • What you save in output should be an output of renderFunction

  • use input values as input$inputId

  • renderPlot({CODE CHUNK})

  • Reactivity automatically occurs whenever you use an input value to render an output object

  • All things connected to input$num updates all the output that depends on input$num

  • Use server function to assemble all inputs

  • Deploy your app as – you app.R in a directory.

  • In the very beginning, there were two files. You have ui.R and server.R. This still works

  • If the ui and server are big files, then you can split app.R in to two files. You need to use these files with the same name

  • Run in viewpane where the app is launched in the IDE itself..Cool feature

  • devtools::install_github installs package from github

  • deploy shiny apps on the cloud

  • shinyServer is open source. You can use shinyServer in your company, use it in your own environment