What am I doing wrong?
This is the function that is being called from the function external to the Gui and to the Server and which is in an file called utilities.R in the Utilities folder. I use source() to import the script.
checkParams <- function(PARAMSfullFile = NULL){
pass <- TRUE
return(pass)
}
ui <- fluidPage(
sidebarLayout(
mainPanel(
#tableOutput("contents")
textOutput("textbox")
)
)
)
glycoPipe <- function(PARAMSfullFile) {
pass <- glycoPipe(PARAMSfullFile)
list(pass = pass)
}
server <- function(input, output) {
source("Utilities/utilities.R", chdir = TRUE)
output$contents <- renderTable({
if(input$btn){
hide("btn")
}
inFile = input$file
inFileName = input$file$name
if(is.null("inFile")){
return()
}
req(inFile)
validate( need(file_ext(inFile) %in% c(
'tsv'
), "Wrong File Format. The selected file is not a valid tab-separated PARAMS file try again. If
you do not have a parameters.tsv file in your directory stop clycoPipe create a file and re-start glycoPipe"))
read.delim(inFile$datapath, quote = "", sep = '\t')
result <- glycoPipe(inFileName)
#start_time_text <- strftime(result$start_time, "%H:%M:%S")
value <- result$pass
#value <- result$as.list(pname)
output$textbox <- renderText({
value
})
})
}
shinyApp(ui = ui, server = server)