I am trying to create a conditional panel based on the returned value of a utility function that is called from the server function. I have made the returned value variable 'returnedValue' global by writing it in a global.R file. It seems that the conditionalPanel is tied to the server function input and output
global.R
returnedValue = TRUE
app.R
server <- function(input, output){
result <- glycoPipe(inFileName)
returnedValue = result$pass
returnedText <- result$params
}
the function may return TRUE or FALSE. if it returnedValue is FALSE, i want to display a conditional panel
in the UI
ui <- fluidPage(
conditionalPanel(
condition = "returnedValue == 'FALSE'"
#request input
)
There are not errors or complains when I run the program, but the condition does not work. The conditional panel displays all the time weather the returnedValue is TRUE or FALSE.
The problem is that I am not trying to use in the condition a server input or output, but the return of a function. Is there anyway this can be done?