Rshiny throws error after publish the app

The code you posed doesn't use the data object anywhere other than the line defining it in ui.R. The data frames that are plotted in the posted code are: recommendation, sujith, and diamonds (in the commented out section). The sujith data frame isn't defined anywhere. If this code is working as-is on your local system, it's probably because you have objects lingering in your environment from previous work. It's good practice to test your code locally with a new session and a clean environment, to rule out that sort of bug.

It would be a good idea to take a look at our FAQ on debugging and creating reproducible examples for Shiny: Shiny debugging and reprex guide

This is the sort of problem that can be difficult to make a reproducible example for, but you can still do more to help your helpers. There's a lot in this code that doesn't seem to relate to your problem, and I'm afraid that it's asking a lot to expect people to sort through it all. Your best bet is to make a copy of your app and start stripping things out until you've got the simplest possible set of code that still exhibits the problem, then post that here (but please don't overwrite your original post again — as @martin.R noted, it makes the thread confusing to follow for later readers).

1 Like