Site icon R-bloggers

Extending accessibility of open-source statistical software to the masses A shiny case study

[This article was first published on Educate-R - R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

< section>

Extending accessibility of open-source statistical software to the masses: A shiny case study

Brandon LeBeau

University of Iowa

< section>

R

< section>

Flexibility of R

< section>

R package documentation and examples

https://www.rdocumentation.org/packages/dplyr/versions/0.5.0/topics/summarise

< section>

Blog posts

https://blog.rstudio.org/2014/01/17/introducing-dplyr/

< section>

Vignettes

https://cran.rstudio.com/web/packages/dplyr/vignettes/introduction.html

< section>

Weaknesses of these types of documentations

< section>

What is Shiny

< section>

Advantages of Shiny

< section>

Disadvantages of Shiny

< section>

Components of Shiny

  1. User Interface (ui.r)
    • What the user sees and interacts with
  2. R Analysis (server.r)
    • The R code running behind the scenes

< section>

User Interface

shinyUI(
  fluidPage(    
    titlePanel("Telephones by region"),
    sidebarLayout(      
      sidebarPanel(
        selectInput("region", "Region:", 
                    choices = colnames(WorldPhones)),
        hr(),
        helpText("Data from AT&T (1961) The World's Telephones.")
      ),

      mainPanel(
        plotOutput("phonePlot")  
      )
    )
  )
)

< section>

Server File

shinyServer(function(input, output) {

  output$phonePlot <- renderPlot({

    barplot(WorldPhones[ , input$region] * 1000, 
            main = input$region,
            ylab = "Number of Telephones",
            xlab = "Year")
  })
})

< section>

Case Study

install.packages('devtools')
devtools::install_github('lebebr01/pdfsearch')
pdfsearch::run_shiny()

< section>

Case Study 2

devtools::install_github('lebebr01/simglm')
simglm::run_shiny()

< section>

Conclusions

< section>

Questions?

To leave a comment for the author, please follow the link and comment on their blog: Educate-R - R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.