Skip to content

Commit

Permalink
Added checkboxes to include all cols re. #28.
Browse files Browse the repository at this point in the history
  • Loading branch information
AEBilgrau committed Feb 24, 2019
1 parent 8096bfe commit 957a9e0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
14 changes: 11 additions & 3 deletions inst/shiny/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,9 @@ shinyServer(function(input, output, session) {
colnames(mat) <- paste0("comp", seq_len(ncol(mat)), "prob")

# Subset to selected cols
tab <- tab[, input$model_cols]
if (!input$full_dl_include_all_cols) {
tab <- tab[, input$model_cols]
}

# Construct output dataset
tab <- cbind(tab, as.data.frame(mat), class = cls)
Expand Down Expand Up @@ -931,7 +933,11 @@ shinyServer(function(input, output, session) {

box(
title = "Classified data",
footer = downloadButton('full_downloadData', 'Download'),
footer = fluidRow(
column(1, downloadButton('full_downloadData', 'Download')),
column(4, checkboxInput(inputId = "full_dl_include_all_cols",
label = "Include all uploaded columns"))
),
status = "info",
width = 12,
collapsible = TRUE,
Expand Down Expand Up @@ -1167,7 +1173,9 @@ shinyServer(function(input, output, session) {
req(cls <- meta_classification())

# Subset to selected cols
tab <- tab[, input$model_cols]
if (!input$meta_dl_include_all_cols) {
tab <- tab[, input$model_cols]
}

# Construct output
tab$local_idr <- cls$idr
Expand Down
6 changes: 5 additions & 1 deletion inst/shiny/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,11 @@ shinyUI(
uiOutput("meta_ui_selectize_model_cols_xy"),
box(
title = "Classified data",
footer = downloadButton('downloadData', 'Download'),
footer = fluidRow(
column(1, downloadButton('downloadData', 'Download')),
column(4, checkboxInput(inputId = "meta_dl_include_all_cols",
label = "Include all uploaded columns"))
),
status = "info",
width = 12,
collapsible = TRUE,
Expand Down

0 comments on commit 957a9e0

Please sign in to comment.