0

I started working on R shiny from last couple of weeks only. I am working on a project that basically QC the values for number of data frames that are generated from two different files. Anyways, the issue is that I have a big R script that did almost all the data calibration and one file generated number of data frames based on number of excel tabs and all data frames have different columns, thus, cannot be binded. So I have crated a function (my_function) of R script and passing three parameters - 1. Input file and other two entered through Shiny UI. Output of R script will be a list contains multiple data frames. However, I ma not able to generate dynamic names of data frames and therefore cannot use them further. Can anyone help me out in this ?

observeEvent(input$goButton ,
               {
                 cc <- my_function(input$v_inputfile$datapath, as.numeric(input$col_headers), input$wave_data)
                 print(length(cc))
                 for(jj in 1:length(cc)){
                   local({
                     print(class(cc[[jj]]))
                     assign(paste0("df_",jj),cc[[jj]])
                     print("End")
                   })
                 }
                  output$contents <- DT::renderDataTable({
                   head(`df_1`)
                 })
               })
  • Hi, welcome to SO. You should probably read [How to make a great R reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example?rq=1) and edit your question so we can have a look at your problem. Do you just want to print the names of all dataframes (as I understand in your question) or display the whole dataframe ( as you used `renderDataTable`)? – julien.leroux5 Aug 12 '21 at 08:35

0 Answers0