Skip to content

Commit

Permalink
fixing #246
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhard-da committed Jan 22, 2018
1 parent b32b670 commit ffa4ec2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions inst/shiny/sdcApp/controllers/ui_categorical.R
Expand Up @@ -271,11 +271,11 @@ kAnon_impvec <- reactive({
if (length(cn)==0) {
return(c(""))
}
# we need to sort the inputs properly

# we need to sort the inputs properly
# in case >= 10 key vars have been specified
ii <- as.numeric(sapply(strsplit(cn, "_"), tail, 1))
cn <- cn[order(ii)]
cn <- cn[order(ii)]
vals <- unlist(lapply(cn, function(x) {
input[[x]]
}))
Expand All @@ -291,17 +291,17 @@ kAnon_comb_params <- reactive({
if (length(cn1)==0) {
return(NULL)
}
# we need to sort the inputs properly

# we need to sort the inputs properly
# in case >= 10 key vars have been specified
ii <- as.numeric(sapply(strsplit(cn1, "_"), tail, 1))
cn1 <- cn1[order(ii)]
cn1 <- cn1[order(ii)]
vals1 <- unlist(lapply(cn1, function(x) {
input[[x]]
}))

cn2 <- cn[grep("sl_kanon_combs_", cn)]
cn2 <- cn2[order(ii)]
cn2 <- cn2[order(ii)]
vals2 <- unlist(lapply(cn2, function(x) {
input[[x]]
}))
Expand Down Expand Up @@ -436,7 +436,7 @@ output$ui_kAnon <- renderUI({
btn <- NULL
impvec <- kAnon_impvec()
pp <- kAnon_comb_params()
if (!is.null(pp) && length(pp$use)==0) {
if (input$rb_kanon_useCombs=="Yes" & (!is.null(pp) && length(pp$use)==0)) {
return(NULL)
}
if (kAnon_useImportance() && any(impvec=="")) {
Expand Down

0 comments on commit ffa4ec2

Please sign in to comment.