Commit 7e6ec620 authored by Sandra Derozier's avatar Sandra Derozier
Browse files

Test Download Button

parent 61c53484
......@@ -30,17 +30,21 @@ app_server <- function(input, output, session) {
amb <- find_level(data)
output$txt <- renderUI({paste(input$asv, "- ", nrow(data) ," affiliation, ambiguity at rank ", amb)})
output$table <- DT::renderDT({data}, selection = 'single')
#output$selection <- renderUI({paste(output$table$tableId_rows_selected)})
output$selection <- renderUI({
s = input$table_rows_selected
if (length(s)) {
# cat('These rows were selected: ')
# cat(s, sep = ', ')
paste("These rows were selected: ", s)
}
})
})
output$download <- downloadHandler(
filename = function() {
paste('data-', Sys.Date(), '.csv', sep='')
},
content = function(con) {
write.csv(data, con)
})
})
}
\ No newline at end of file
......@@ -15,11 +15,11 @@ app_ui <- function() {
dashboardSidebar(
fileInput("biom",
"Upload Biom File",
accept = c(".biom")
accept = c("text/plain", ".biom")
),
fileInput("tsv",
"Upload MultiHits TSV File",
accept = c("text/csv", ".tsv")
accept = c("text/tab-separated-values", ".tsv", "text/csv")
),
textOutput("tmp")
),
......@@ -35,7 +35,10 @@ app_ui <- function() {
HTML("<br/>"),
DT::DTOutput("table"),
HTML("<br/>"),
htmlOutput("selection")
htmlOutput("selection"),
HTML("<br/>"),
actionButton("clean", "Clean ASV"),
downloadButton("download", "Download")
)
)
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment