Skip to content

Commit

Permalink
Interface improvement. Box for classified data download is now genera…
Browse files Browse the repository at this point in the history
…ted server side.
  • Loading branch information
AEBilgrau committed Feb 6, 2019
1 parent edec486 commit 62fb956
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
22 changes: 20 additions & 2 deletions inst/shiny/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ shinyServer(function(input, output, session) {
validate(need(user_data(), "Please upload some data."))

tagList(
h1("Dataset loaded"),
p(sprintf("%i rows and %i columns detected. Showing %i rows below.",
nrow(user_data()),
ncol(user_data()),
Expand Down Expand Up @@ -424,7 +423,7 @@ shinyServer(function(input, output, session) {



# sigma input functionality -----
# Sigma input functionality -----
# Update full_start_theta reactiveVal upon edit event
observe({
req(rv$m)
Expand Down Expand Up @@ -555,6 +554,7 @@ shinyServer(function(input, output, session) {
})


# Pie plot ----
output$full_plot_pie <- renderUI({
req(fit <- full_fit())

Expand Down Expand Up @@ -884,6 +884,24 @@ shinyServer(function(input, output, session) {
}
)

output$full_classified_data <- renderUI({
req(full_prob())
req(full_classification())

box(
title = "Classified data",
footer = downloadButton('full_downloadData', 'Download'),
status = "info",
width = 12,
collapsible = TRUE,
collapsed = TRUE,
solidHeader = TRUE,

DTOutput("full_out_file_table")
)
})



# DEBUG ----
output$DEBUG <- renderPrint({
Expand Down
17 changes: 3 additions & 14 deletions inst/shiny/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ shinyUI(
collapsible = TRUE,
solidHeader = FALSE,


# Content
htmlOutput("input_file_description"),
DTOutput("in_file_table")
Expand Down Expand Up @@ -167,24 +166,14 @@ shinyUI(
uiOutput("full_mu_box"),
uiOutput("full_sigma_box"),
uiOutput("full_plot_pie"),
uiOutput("full_ui_selectize_model_cols_xy"),
uiOutput("full_res_theta_plot"),
uiOutput("full_res_mu"),
uiOutput("full_res_sigma"),
uiOutput("full_obs_plot"),
uiOutput("full_rank_plot"),
uiOutput("full_latent_plot"),
uiOutput("full_ui_selectize_model_cols_xy"),
uiOutput("full_res_theta_plot"),
box(
title = "Classified data",
footer = downloadButton('full_downloadData', 'Download'),
status = "info",
width = 12,
collapsible = TRUE,
collapsed = TRUE,
solidHeader = TRUE,

DTOutput("full_out_file_table")
),
uiOutput("full_classified_data"),
uiOutput("full_fit_log")
#,verbatimTextOutput("DEBUG")
)
Expand Down

0 comments on commit 62fb956

Please sign in to comment.