While looking into issue #269, I noticed that every time the k-anonimity page is opened in sdcApp(), the following error is shown in the R console:
The reason is the evaluation of the condition in line 440 of ui_categorical.R:
if (input$rb_kanon_useCombs=="Yes" & (!is.null(pp) && length(pp$use)==0)) {
Initially, input$rb_kanon_useCombs is "No", but nevertheless the second part of the condition is also evaluated. However, pp is, probably due to the change in Shiny, no longer NULL. In fact, is.null(pp) returns
Probably, because cn1 in line 291
cn1 <- cn[grep("rb_kanon_usecombs_", cn)]
is no longer of length 0 (class is character).
A simple way to fix this would be to use a double & in line 440:
if (input$rb_kanon_useCombs=="Yes" && (!is.null(pp) && length(pp$use)==0)) {
In that way, the second part isn't evaluated if input$rb_kanon_useCombs is "No".
This warning/error can be reproduced with any dataset and specifying a few categorical key variables. Then going to k-Anonimity on the Anonymize tab will briefly show the error on the screen as well as permanently in the R console.
While looking into issue #269, I noticed that every time the k-anonimity page is opened in sdcApp(), the following error is shown in the R console:
The reason is the evaluation of the condition in line 440 of ui_categorical.R:
if (input$rb_kanon_useCombs=="Yes" & (!is.null(pp) && length(pp$use)==0)) {
Initially, input$rb_kanon_useCombs is "No", but nevertheless the second part of the condition is also evaluated. However,
pp
is, probably due to the change in Shiny, no longer NULL. In fact, is.null(pp) returnsProbably, because cn1 in line 291
cn1 <- cn[grep("rb_kanon_usecombs_", cn)]
is no longer of length 0 (class is character).
A simple way to fix this would be to use a double & in line 440:
if (input$rb_kanon_useCombs=="Yes" && (!is.null(pp) && length(pp$use)==0)) {
In that way, the second part isn't evaluated if input$rb_kanon_useCombs is "No".
This warning/error can be reproduced with any dataset and specifying a few categorical key variables. Then going to k-Anonimity on the Anonymize tab will briefly show the error on the screen as well as permanently in the R console.