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
Title: Use case - Demo updateselectInput() and also introducing observeEvent() function | |
Description: Powered by R, Shiny, and RStudio. | |
License: GPL-3 | |
Author: Abhinav Agrawal | |
DisplayMode: Showcase | |
Tags: R, R Shiny,updateselectInput(), observeEvent() | |
Type: Shiny |
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
Title: Use case - Change the side bar panel elements based on the selected tab & demo conditionalPanel() function | |
Description: Powered by R, Shiny, GGPLOT2 and RStudio. | |
License: GPL-3 | |
Author: Abhinav Agrawal | |
DisplayMode: Showcase | |
Tags: R, R Shiny,TabsetPanel, ConditionalPanel | |
Type: Shiny |
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)({ | |
# x contains all the observations of the x variable selected by the user. X is a reactive function | |
x <- reactive({ | |
iris[,as.numeric(input$var1)] | |
}) | |
# x contains all the observations of the y variable selected by the user. Y is a reactive function | |
y <- reactive({ | |
iris[,as.numeric(input$var2)] | |
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)({ | |
## Get the value of the dataset that is selected by user from the list of datasets | |
data <- reactive({ | |
get(input$dataset) | |
}) | |
## to output the dataset |
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(ggplot2) | |
shinyServer(function(input,output)({ | |
# downloadHandler contains 2 arguments as functions, namely filename, content | |
output$down <- downloadHandler( | |
filename = function() { | |
paste("multiplot.pdf") | |
}, |
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(leaflet) | |
library(RCurl) | |
shinyServer(function(input, output) { | |
URL <- getURL("https://commondatastorage.googleapis.com/ckannet-storage/2012-07-09T214020/global_airports.csv") | |
mydata <- read.csv(text = URL) |
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
# install.packages("XML") | |
library(XML) | |
library(plyr) | |
# Preparing the data | |
cities <- c("Varanasi, India", "Jaipur, India", "Residency Road, Bangalore, India" ,"ITPL, Bangalore, India", "Phoenix, USA", | |
"Guadalajara, Mexico", "Marthahalli, Bangalore, India", "Melbourne, Australia","Bangalore, India") | |
desc = c("School @ St. John's School", "Graduation @ SKIT, Jaipur", "Job @ Think Ahead Advisory Services Ltd.", | |
"Job @ TCS Bang.", "Job @ TCS Phoenix", "Job @ TCS Mexico", "Job @ NICE Interactive Solutions", "Job @ NICE Systems Aus.","Job @ NICE Interactive Solutions") | |
# Function to get the latitude and longitude |
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) | |
# use the below options code if you wish to increase the file input limit, in this example file input limit is increased from 5MB to 9MB | |
# options(shiny.maxRequestSize = 9*1024^2) | |
shinyServer(function(input,output){ | |
# This reactive function will take the inputs from UI.R and use them for read.table() to read the data from the file. It returns the dataset in the form of a dataframe. | |
# file$datapath -> gives the path of the file | |
data <- reactive({ | |
file1 <- input$file |
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
Title: Demo for multiple options and actions using selectinput | |
Description: Powered by R, Shiny and Rstudio. | |
License: GPL-3 | |
Author: Abhinav Agrawal | |
DisplayMode: Showcase | |
Tags: R, R Shiny, shinydashboard | |
Type: Shiny |
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
Title: shinydashboard layout | |
Description: Powered by R, Shiny, shinydashboard and Rstudio. | |
License: GPL-3 | |
Author: Abhinav Agrawal | |
DisplayMode: Showcase | |
Tags: R, R Shiny, shinydashboard | |
Type: Shiny |