I'm making an app in Shiny which allows users to upload data or upload a save file.
If a user uploads new data then the flow looks like:
Upload Files >> Select Sheets >> Select Columns >> Sentence Tokenization >> Word Tokenization >> Graphics
Originally, I had been using observe() statements with reactiveValues() so at each step, I stored off the results into a reactiveValues(). This enabled the save file upload to work like:
Upload Save File >> Set sentences >> Set words >> Graphics
I would like to be able to accomplish something similar but using reactive() statements. So, given that I have uploadedFiles = reactive() and uploadedSave = reactive() how do I write a reactive with the following pseudo code:
rawText = reactive({
if uploadedFiles() flushes reactivity then uploadedFiles()
else if uploadedSave() flushes reactivity then uploadedSave()
else NULL
})
I don't have an "error" I'm trying to troubleshoot, just trying to think through the process of using a reactive to act like a 'most recently flushed' gate to allow my data flow to start from two different places and converge to a single one.