This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
ui <- fluidPage( | |
# Upload zip files | |
fileInput("file", "Upload Zip file", accept = ".zip"), | |
# action button to unzip the file | |
actionButton("unzip", "Unzip Files"), | |
# to display the metadata of the zipped file | |
tableOutput("filedf"), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(shinydashboard) | |
mydata = read.csv("Wholesale customers data.csv", stringsAsFactors = FALSE, header = TRUE) | |
shinyServer(function(input, output, session){ | |
output$mydatatable <- renderDataTable({ | |
mydata | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(shinydashboard) | |
shinyServer(function(input, output, session){ | |
} | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(shinydashboard) | |
shinyServer(function(input, output, session){ | |
} | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(shinydashboard) | |
shinyServer(function(input, output, session){ | |
} | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) # load the shiny package | |
library(leaflet) # load the leaflet package | |
# quakes dataset is used for this app. It comes with base R. | |
# ?quakes in R console to read more about the dataset | |
# str(quakes) | |
# Classifying the type of earthquake based on magnitude as Light, Moderate, Strong or Major based on the magnitude range | |
quakes$type = ifelse((quakes$mag >= 4 & quakes$mag <= 4.9), "Light [4-4.9]", | |
ifelse((quakes$mag >= 5 & quakes$mag <= 5.9), "Moderate [5-5.9]", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
ui <- fluidPage( | |
tags$div(sliderInput("slide1", "Slider1", min = 0, max=10, value=4), style="display:inline-block"), | |
tags$div(sliderInput("slide1=2", "Slider2", min = 0, max=10, value=4), style="display:inline-block"), | |
tags$div(sliderInput("slide3", "Slider3", min = 0, max=10, value=4), style="display:inline-block") | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
shinyServer(function(input, output, session) { | |
output$table1 <- renderTable({ | |
mtcars | |
}) | |
output$summary1 <- renderText({ | |
summary(mtcars) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
shinyServer(function(input, output, session) { | |
output$table1 <- renderTable({ | |
mtcars | |
}) | |
output$summary1 <- renderText({ | |
summary(mtcars) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
ui <- basicPage( | |
fluidRow( | |
selectInput("num", "select number of slider inputs", choices = seq(1,5,1)), | |
uiOutput("sliders"), | |
tableOutput("table"), | |
tableOutput("sum") | |
)) |