Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201867

Shiny app fails after successful building of reports

$
0
0

I have a shiny app (gists below)

failing server.R

failing ui.R

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.

enter image description here

In trying to replicate the problem in a "fresh" app to present to SO, I couldn't. I have a near-identical app

working server.R

working ui.R

(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?


Viewing all articles
Browse latest Browse all 201867

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>