0

I have written a small application in shiny. I have the following files: global.R, server.R and ui.R

In the global.R file, I load my data. I read data from three different csv files. a.csv, b.csv and c.csv and I use merge to join a.csv and b.csv and another merge to join a.csv and c.csv

In the ui.R file, I have the layout for some filters. In the shinydashboard, I have tabItems, tabPanels containing selectInput and sliderInput for the filters.

In the server.R file, I have the implementation. One functionality is that based on the filters, I show a table with some values. If the user selects a row, I activate another tab with more details on the selected row (eg, graphs, tables etc related to the selected row)

This whole thing works perfectly when I run it on my machine using RStudio. When I move the code to the shiny server, I get the first tab layout, the functionality to activate second tab on selection all working. However in the second tab, I cannot see the table, and I get an error for the graphs. Error: 'from' cannot be NA, NaN or infinite.

I have no clue why I cannot see any data on the tab when I run the application on the server. I suspect maybe there is some problem in the merge. I want to debug and find the problem. I wanted to know how I can debug since I run this on the server using a web browser and all I can see on the browser is a line Error: 'from' cannot be NA, NaN or infinite and blank table.

Can someone give some inputs on debugging to find the problem. Thanks

krish
  • 1,388
  • 2
  • 18
  • 28
  • Do you have assess to the server logs? (default location is /var/log/shiny-server, you may need root to read them) There will be more details on the error there. What about package versions? is the server and your client running the same versions of packages? – Bishops_Guest Nov 30 '16 at 21:03
  • @Bishops_Guest: Thank you for your inputs. The problem was indeed with the package versions for DT. – krish Dec 05 '16 at 19:35

1 Answers1

0

I was able to figure out the problem. The problem was with the package version of DT on the server. The package version of DT on the server was 0.1 and that version has some bugs (based on this post: https://github.com/rstudio/DT/issues/206) I was able to get the package version updated to 0.2 and all worked fine.

The problem was with using input$table_rows_selected with the old version of DT package with selection = 'single' as a parameter. Moving to 0.2 version of DT package resolved the problem.

krish
  • 1,388
  • 2
  • 18
  • 28