How to make actionButton runs code.R to an uploaded dataset?

49 Views Asked by At

Am doing R Shiny web App that allows user to upload particular dataset from several sources. The app allows user to upload data first then preprocess it using existing code.R
for example if df1 uploaded must clean it using code1.R and so on for df2 and df3.

The code as follows


    server = function(input, output,session){

      vals <- reactiveValues()
      observeEvent(input$run, {
        vals$korek_out <- korek()
        showModal(modalDialog("calculation finished!"))
      })
      
    }
  )
)
1

There are 1 best solutions below

0
On

I managed to solve the problem above and be able to upload and preprocess data based function I wrote using this method

observeEvent(input$cleank, {
      output$contents <-  renderTable({inFile <- korek(kork = kdat)})

where korek(kork) is a user defined function runs from code.R