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) | |
#tu<-read.csv(file="tu.csv", header = TRUE, sep = ",") | |
#attach(tu) | |
tu <- data.frame(id=rnorm(1000),size=rnorm(1000),months=rnorm(1000)) | |
shinyServer(function(input, output) { | |
it<- reactive({ | |
print(input$tu) | |
switch(input$tu, | |
"id" = tu$id, |
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
item1,item2,item3,item4,item5,item6,item7,item8,item9,item10 | |
1,1,,,1,1,,,, | |
,,1,1,,,1,1,, | |
1,,,,1,,,,1,1 | |
,1,,1,1,,1,,1, | |
1,1,1,1,1,1,,,,1 | |
,1,,,,,1,,, | |
,,1,1,1,1,,1,, | |
1,,,1,,,,1,,1 | |
,,1,1,1,,,,1,1 |
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
d <- parse("server stripped bare.R") | |
dc <- as.character(d) | |
reactives <- NULL | |
# find reactive sources | |
for(t in dc) { | |
if( grepl("reactive(.*)$",t)) { #if it is reactive | |
g <- gregexpr("^[A-Za-z0-9._]*",t) | |
p <- as.numeric(g[[1]]) | |
l <- attr(g[[1]],"match.length") |
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) | |
# Define server logic for random distribution application | |
shinyServer(function(input, output) { | |
# Reactive expression to generate the requested distribution. This is | |
# called whenever the inputs change. The renderers defined | |
# below then all use the value computed from this expression | |
data <- reactive({ | |
dist <- switch(input$dist, |
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
shiny::runGitHub("shinyhandsontable-example","xiaodaigh") |
NewerOlder