Integrating R code with Shiny app


#41

However, it works if I do not right the second conditional. That makes me think again that the error is in the way the second conditional asks -if(returnValue == TRUE). there must be another way of asking the question.


#42

I found out that the type of the variable pass = FALSE or TRUE is logical. How do you test a logical value for TRUE or FALSE?


#43

Solved. I got it. Instead of if(pass == TRURE) I should use if(isTRUE(TRUE))


RStudio server and Shiny server
#44

Hi, How do I get the name of an uploaded file in shiny? I am using input$file$name in the function call but it does not work. It works if I send as parameter the name of the file, instead input$file$name. Please see working example

observeEvent(input$value,{
   if(input$value == 'Y'){
     inFile = input$file
     inFileName = inFile$name
     result <- glycoPipe("PARAMS.tsv")
     returnedValue = result$params
     output$box <- renderText({
       paste("Your result is ", returnedValue)
     }
     )
    }
  })