Ken,
Thanks for sending the files.
I did a quick check, but didn't have time to go through it thoroughly.
When I run your application locally, after changing the absolute paths to relative paths, I see the error on changing directory. So this is not a problem only on shinyapps. Do you not see any errors running locally?
This points to the fact that your current directory changes during the application run. I added a little output of getwd() to the first page, and verified that your current directory in fact changes.
So it seems that the function(s) that set the directory to a directory within your application gets called again. The first time the call is successful, but any subsequent time, this will cause error as your current directory has already changed. So setwd with absolute path will always work, but with relative path will only work once, unless you set it back to the top level. I didn't get deep into your code, and can't tell where/how to set it back. You would know better. Or alternatively, do not use setwd(), but access the data and function files using a relative path.
Hope this helps!
Best,
Fereshteh