shinyServer(function(input, output) {
filedata <- reactive({
inpath <- input$my_file_path
read.csv(inpath)
})
output$filetable <- renderTable({
filedata()
})
})shinyUI(pageWithSidebar(
headerPanel("CSV Viewer"),
sidebarPanel(
textInput("my_file_path", label = "Full path to my file", value = file.choose())
),
mainPanel(
tableOutput("filetable")
)
))--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/74c44f50-4ea1-4a51-99ca-90a3aba7a9c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi, thanks… appreciate your time. Sorry for the repeat emailspam... I'm new to Google groups
I wish I could put it in a better way… In short, I can get a shinyFiles dialog box up to ask for a file (and a folder for that matter) and correctly display the folder path in the UI (as per the shinyFilesExample()) but a downstream reactive expression stops working. It’s a reactive expression to connect to an SQLite database (which is the giant file) and grab some gene expression data based on another textInput box, and plot it. I have this working fine without shinyFiles but the solution is really inelegant (see here:
https://github.com/NZGL/shiny_cuffdiff
As well, if I simply have a submit button in the downstream code (I.e. submitButton) then the shinyFiles “select a file” dialog box suddenly stops being able to navigate up and down folders (it still shows the folders, you just can’t click on them to see what’s inside and you can’t select files). I can see some issues that seem similar on the shinyFiles issues page but I’m really not enough of an expert to understand the issue. Also I’m reluctant to hassle the developer of shinyFiles since (a) he recently had a concussion and (b) he’s finishing his PhD (I’m not sure which is worse). So I’m kind of stuck with half-solutions for now.