I have a shiny app (gists below)
that takes input, queries a database, builds an .Rmd
file into a beamer presentation, and writes out an .xlsx
file of data. All of these steps happen successfully: the .Rmd
file is knitted and converted to pdf
and the .xlsx
file is written to the appropriate location. The last step is to offer up both of these files for download a .zip
archive. Once the files are built and stored appropriately, the app crashes and the "Download Report" button does not render.
In trying to replicate the problem in a "fresh" app to present to SO, I couldn't. I have a near-identical app
(identical except for the report being rendered) that functions without error. The report builds, the .xlsx
file is stashed appropriately, and the .zip
archive is offered for download.
I'm missing something somewhere, but I don't know where it is. I'm inclined to think that it's something in the .Rmd
file that I'm knitting in the failing app but given it renders successfully, I have no idea what could be going on and there's not much of an error in the app itself, other than the Warning: Error in if: argument is of length zero
.
Can someone point me in the direction of whatever it is I'm missing?