Skip to content

Commit

Permalink
Added new files
Browse files Browse the repository at this point in the history
  • Loading branch information
aagarw30 committed Mar 16, 2015
1 parent de16a1f commit 1b5af3f
Show file tree
Hide file tree
Showing 30 changed files with 905 additions and 0 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file added AddImageVideoToShinyApp/.DS_Store
Binary file not shown.
337 changes: 337 additions & 0 deletions AddImageVideoToShinyApp/.Rhistory
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()
98 changes: 98 additions & 0 deletions AddImageVideoToShinyApp/README.html

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions AddImageVideoToShinyApp/README.md
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

43 changes: 43 additions & 0 deletions AddImageVideoToShinyApp/server.R
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")))
})
})
Loading

0 comments on commit 1b5af3f

Please sign in to comment.