I am creating a Shiny app for a R package of mine.
In my package, I read in a FASTA sequence alignment file using the ape
package via
seqs <- ape::read.dna(file = file.choose(), format = "fasta")
This works fine within my app locally since file.choose()
is interactive. However, the above code fails on shiny apps.io
.
It was suggested to me via Stack Overflow to write a new file.choose()
function that incorporates Shiny's syntax, but I haven't a clue where to begin with this, since I am a Shiny novice. See: Popup window not appearing in R Shiny app - Stack Overflow for more details
Does anyone know where to start with coding up such a function? Perhaps someone has already implemented a working version and is willing to share?
Note: I don't want to have to use shiny::fileInput()
as this would require me to change my package code, which runs in the background of my app,
Perhaps if Shiny guru Dean Attali is on the forum, he can weigh in?