Permalink
Browse files

Removed custom file upload.

  • Loading branch information...
1 parent 56c4ac1 commit b6dbe1a2d24846ee8c9a5d7254edaea1039091df @trestletech committed Feb 5, 2013
Showing with 9 additions and 34 deletions.
  1. +6 −12 grn/server.R
  2. +3 −22 grn/ui.R
View
@@ -38,19 +38,13 @@ shinyServer(function(input, output) {
data <- reactive(function(){
- if (input$dataSource == FALSE){
- path <- input$url
+ path <- input$url
- #translate relative paths to server-friendly paths
- if (substr(input$url, 0, 2) == "./"){
- path <- paste("./www/", substring(input$url, 3), sep="")
- }
- } else{
- df <- input$file
- path <- df$datapath
- }
-
-
+ #translate relative paths to server-friendly paths
+ if (substr(input$url, 0, 2) == "./"){
+ path <- paste("./www/", substring(input$url, 3), sep="")
+ }
+
data <- read.csv(path, row.names=1)
View
@@ -30,28 +30,9 @@ shinyUI(pageWithSidebar(
# label = "Source of the gene expression data:",
# choices = c("Local", "Remote"),
# selected = "Remote"),
-
- checkboxInput(inputId= "dataSource", label="Use a file stored on my local machine.", value=FALSE),
-
- conditionalPanel(
- condition = "input.dataSource == false",
- textInput(inputId="url", label="File URL:", value="./sampleExp.csv"),
- helpText(HTML("<div style=\"text-indent: 25px\">Download the sample dataset <a href=\"sampleExp.csv\">here</a></div>"))
- ),
-
- conditionalPanel(
- condition = "input.dataSource == true",
- fileInput(inputId = "file", label="Network to reconstruct:"),
- helpText(HTML("<div style=\"color: red; font-weight: bold\">Warning:</div> Local file uploads in
- Shiny are <strong>very</strong> experimental. I have had success using this
- feature from the latest version of Firefox but, at the time of writing, it
- does not seem to be working from Chrome or IE.
- <p>If you have trouble using this feature but want to analyze your own
- dataset, you can upload the file to a public URL using a tool like
- <a href=\"http://dropbox.com\">Dropbox</a> or one of the many free upload
- sites."))
- ),
-
+ textInput(inputId="url", label="File URL:", value="./sampleExp.csv"),
+ helpText(HTML("<div style=\"text-indent: 25px\">Unfortunately, Shiny isn't playing nicely with file uploads at the time of writing, so I've disabled the custom file uploads temporarily. However, you can post your expression file online using any one of the free file hosting sites now available and provide the URL here to process it in this app! <p>You can also download the sample dataset <a href=\"sampleExp.csv\">here</a>.</div>")),
+
HTML("<hr />"),
selectInput(inputId = "orientation",

0 comments on commit b6dbe1a

Please sign in to comment.