Skip to content

A fork of Brandon's excellent RShiny tutorial, with new stuff added for BINF 3121, statistics for bioinformatics taught at University of North Carolina at Charlotte in fall of 2022. Please note that the main development for this fork will be done on Bitbucket. I am using this fork for submitting PR's to Brandon's upstream repo.

aloraine/R-Shiny-Tutorial-BINF3121

 
 

Repository files navigation

Basic UI Example

ui <- fluidPage(theme = shinytheme("cerulean"),
                navbarPage(
                  "Shinny Page",
                  
                    tabPanel("Main Tab",
                              sidebarPanel("This is the side"),
                              mainPanel("This is the Main")
                              ),
                    
                    
                    tabPanel("Tab2","In Progress")
                  )
      )
server <- function(input, output) {
  
  output$distPlot <- renderPlot({
    
    
    if(input$SelectPlot =="Jitter"){
      a <- ggplot(iris,aes(x=Sepal.Length,y=Sepal.Width)) + geom_jitter(shape=input$Shape)
    }
    
     if(input$SelectPlot =="Scatter"){
      a <- ggplot(iris,aes(x=Sepal.Length,y=Sepal.Width)) + geom_point(shape=input$Shape)
     }
    
     if(input$SelectPlot =="Line"){
      a <- ggplot(iris,aes(x=Sepal.Length,y=Sepal.Width)) + geom_line(col=input$Shape)
     }
  
    
    a
  })#output$dist
}#Server
shinyApp(ui = ui, server = server)
## PhantomJS not found. You can install it with webshot::install_phantomjs(). If it is installed, please make sure the phantomjs executable can be found via the PATH variable.

Shiny applications not supported in static R Markdown documents

About

A fork of Brandon's excellent RShiny tutorial, with new stuff added for BINF 3121, statistics for bioinformatics taught at University of North Carolina at Charlotte in fall of 2022. Please note that the main development for this fork will be done on Bitbucket. I am using this fork for submitting PR's to Brandon's upstream repo.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published