forked from aagarw30/R-Shinyapp-Tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
905 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,337 @@ | ||
shiny::runApp('Desktop/downexp/PNG') | ||
shiny::runApp('Desktop/downexp/PNG') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
library(shiny) # load the shiny package | ||
library(ggplot2) | ||
library(dataset) | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/render') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/hit') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
shiny::runApp('Desktop/downexp/fileinput') | ||
getwd() | ||
setwd("/Users/MacBookPro/rpres") | ||
setwd("/Users/MacBookPro/rpres") | ||
fib <- function(x){ | ||
f <- numeric(x) | ||
f[1] <- f[2] <- 1 | ||
for(i in 3:x) | ||
{ | ||
f[i] <- f[i-2] +f[i-1] | ||
} | ||
return(f) | ||
} | ||
fib(12) | ||
fib(3) | ||
fib(1) | ||
fib(12) | ||
fib(3) | ||
fib <- function(x){ | ||
f <- numeric() | ||
f[1] <- f[2] <- 1 | ||
if(x>3=){ | ||
for(i in 3:x) | ||
{ | ||
f[i] <- f[i-2] +f[i-1] | ||
} | ||
return(f) | ||
} | ||
else | ||
return(f) | ||
} | ||
fib <- function(x){ | ||
f <- numeric() | ||
f[1] <- f[2] <- 1 | ||
if(x>3){ | ||
for(i in 3:x) | ||
{ | ||
f[i] <- f[i-2] +f[i-1] | ||
} | ||
return(f) | ||
} | ||
else | ||
return(f) | ||
} | ||
fib(4) | ||
fib(2) | ||
fib(1) | ||
fib <- function(x){ | ||
f <- numeric(x) | ||
f[1] <- 1 | ||
f[2] <- 1 | ||
for(i in 3:x) | ||
f[i] <- f[i-1] + f[i-2] | ||
return(f) | ||
} | ||
fib(6) | ||
shiny::runApp('Desktop/Rrelated/RShiny/styling') | ||
shiny::runApp('Desktop/Rrelated/RShiny/styling') | ||
shiny::runApp('Desktop/Rrelated/RShiny/styling') | ||
shiny::runApp('Desktop/Rrelated/RShiny/styling') | ||
shiny::runApp('Desktop/Rrelated/RShiny/styling') | ||
shiny::runApp('Desktop/Rrelated/RShiny/styling') | ||
shiny::runApp('Desktop/Rrelated/RShiny/styling') | ||
shiny::runApp('Desktop/Rrelated/RShiny/styling') | ||
str(tags) | ||
shiny::tags | ||
tags() | ||
tags | ||
shiny$tags | ||
tags | ||
shiny::runApp('Desktop/Rrelated/RShiny/styling') | ||
shiny::runApp('Desktop/Rrelated/RShiny/styling') | ||
names(tags) | ||
shiny::runApp('Desktop/Rrelated/RShiny/styling') | ||
shiny::runApp('Desktop/Rrelated/RShiny/styling') | ||
getwd() | ||
shiny::runApp('Desktop/Rrelated/RShiny/styling') | ||
shiny::runApp('Desktop/Rrelated/RShiny/styling') | ||
getwd() | ||
setwd("/Users/MacBookPro/Desktop/Rrelated/") | ||
list.giles() | ||
list.files() | ||
setwd("/Users/MacBookPro/Desktop/Rrelated/RShiny/styling") | ||
list.files() | ||
shiny::runApp() | ||
?img() | ||
?tags$img | ||
?img() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
names(tags) | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
names(tags) | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() | ||
shiny::runApp() |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
shinyapps - How to add image and video to RShiny app. | ||
========= | ||
- Demostration of using the In-line HTML tags. | ||
- tags object of Shiny could be used in conjunction with helper function to embed HTML elements. | ||
- HTML elements (helper functions) supported by tags object could be seen using names(tags) | ||
- tags$img() # tags on the image helper function | ||
- tags$video() # tags on the video helper function | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
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 | ||
if(is.null(file1)){return()} | ||
read.table(file=file1$datapath, sep=input$sep, header = input$header, stringsAsFactors = input$stringAsFactors) | ||
|
||
}) | ||
|
||
# this reactive output contains the summary of the dataset and display the summary in table format | ||
output$filedf <- renderTable({ | ||
if(is.null(data())){return ()} | ||
input$file | ||
|
||
}) | ||
|
||
# this reactive output contains the summary of the dataset and display the summary in table format | ||
output$sum <- renderTable({ | ||
if(is.null(data())){return ()} | ||
summary(data()) | ||
|
||
}) | ||
|
||
# This reactive output contains the dataset and display the dataset in table format | ||
output$table <- renderTable({ | ||
if(is.null(data())){return ()} | ||
data() | ||
}) | ||
|
||
# the following renderUI is used to dynamically generate the tabsets when the file is loaded. Until the file is loaded, app will not show the tabset. | ||
output$tb <- renderUI({ | ||
if(is.null(data())) | ||
h6("intro video", br(), tags$video(src='reactive.mp4', type="video/mp4", width="350px", height="350px", controls="controls")) | ||
else | ||
tabsetPanel(tabPanel("About file", tableOutput("filedf")),tabPanel("Data", tableOutput("table")),tabPanel("Summary", tableOutput("sum"))) | ||
}) | ||
}) |
Oops, something went wrong.