Some random thoughts, may be wrong:
- Maybe the issue is how the packages are loaded? Try moving all the library() calls from outside your server function to the top of your file (into global scope).
- For this warning:
Warning: namespace ‘ggplot2’ is not available and has been replaced
by .GlobalEnv when processing object ‘a’
I found this stackoverflow answer that has a proposed solution. Try:
rm(.a)
or if your environment is supposed to be empty when app is deployed:
rm(list = ls())
Then save your workspace. Restart R and redeploy your app. Although, it's not an error, but it's good practice to avoid warnings.