class: center, middle, inverse, title-slide # R Shiny - Deployments ## Workshop on Plotting in R ###
Lokesh Mano
• 18-Jan-2022 ### NBIS, SciLifeLab --- exclude: true count: false <link href="https://fonts.googleapis.com/css?family=Roboto|Source+Sans+Pro:300,400,600|Ubuntu+Mono&subset=latin-ext" rel="stylesheet"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous"> <!-- ------------ Only edit title, subtitle & author above this ------------ --> --- name: deploy ## Deployment * R scripts * GitHub * R Package * Docker container * Webpage * Shinyapps.io * Shiny Server (Free) * Shiny Server Pro -- * Automatically deploying to shinyapps.io ``` library(rsconnect) rsconnect::setAccountInfo(name="username", token="HDFGT46YF7TDT6474G47", secret="hdgTDF5FStgdkpJ") deployApp(appName="name") ``` -- * Shiny apps user guide https://docs.rstudio.com/shinyapps.io/index.html * Shiny server guide https://docs.rstudio.com/shiny-server/ --- name: interactive-docs ## Interactive documents * Shiny can run in RMarkdown documents. Set YAML `runtime: shiny`. ``` --- title: Interactive document output: html_document runtime: shiny --- ``` * Shiny widgets can be included directly ```` ```{r} selectInput('n_breaks',label='Number of bins:',choices=c(10,20,35,50),selected=20) ``` ```` * Whole shiny apps can be included directly ```` ```{r} shinyApp( ui=fluidPage(), server=function(input,output) {} ) ``` ```` * Hosted shiny apps can be embedded using `<iframe>` ``` <iframe src="https://user.shinyapps.io/app"></iframe> ``` .small[_Demo: shiny-rmarkdown.R_] --- name: extensions ## Extensions * [Naxstats](https://github.com/nanxstats/awesome-shiny-extensions): Repo collection all shiny extensions * [shinythemes](https://github.com/rstudio/shinythemes): Bootswatch themes for shiny * shinyurl: using URLs to recreate state of an app * shinypod: Reusable modules * [shinyjs](https://deanattali.com/shinyjs/): custom javascript functionality * [shinyWidgets](https://github.com/dreamRs/shinyWidgets): Bootstrap 3 custom widgets * [shinyBS](https://github.com/ebailey78/shinyBS): Bootstrap 3 widgets --- name: help class: spaced ## Help * [**RStudio Shiny home**](https://shiny.rstudio.com/) * [**RStudio Shiny tutorial**](http://shiny.rstudio.com/tutorial/) * [**RStudio Shiny articles**](https://shiny.rstudio.com/articles/) ### Other topics * [Applications of action buttons](http://shiny.rstudio.com/articles/action-buttons.html) * [Progress indicators](http://shiny.rstudio.com/articles/progress.html) * [Shiny modules](https://shiny.rstudio.com/articles/modules.html) ... --- name: end_slide class: end-slide, middle count: false # Thank you. Questions? Slide courtesy: Roy Francis (NBIS, RaukR2021) .end-text[ <p>R version 4.1.2 (2021-11-01)<br><p>Platform: x86_64-pc-linux-gnu (64-bit)</p><p>OS: Ubuntu 18.04.6 LTS</p><br> <hr> <span class="small">Built on : <i class='fa fa-calendar' aria-hidden='true'></i> 18-Jan-2022 at <i class='fa fa-clock-o' aria-hidden='true'></i> 09:51:26</span> <b>2022</b> • [SciLifeLab](https://www.scilifelab.se/) • [NBIS](https://nbis.se/) ]