Closed geanders closed 6 years ago
@geanders The Shiny app looks amazing! The panels within the panels is much cleaner than the radioButton widget at the bottom of the side panel. I will take a closer look at the code later today and try to incorporate other functions into the app before tomorrow's class in case I have anymore questions or issues. The Stack Overflow discussion helps to clarify the read_excel
issue I was struggling with. Thank you, Dr. Anderson!
@KatieKey: This added code gets the file upload connected with the cleaning function you have. You should be able to do something similar for other file uploads. I've added a panel with "Raw Data" to show exactly what's uploaded, as that might be useful for the user to see exactly what they put in. Also, I put panel tabs within the panels that show data, so that users can click through all the different files.
In the original code, the main problem was that the input you get from the "Upload" widget is really just the file path to the uploaded file, not a file that's been read in by
read_excel
or anything. So, you were missing a step to get from the file upload to what you needed to input to your cleaning function. Once that was resolved, there was also a quirky issue with usingread_excel
with this output from a Shiny Upload widget. I included the web address to a Stack Overflow question that discusses this in the code comments. Evidently, you need to add back on the ".xlsx" file extension to get theread_excel
function to work correctly with the Shiny file upload.