Closed thijsbenschop closed 5 years ago
@thijsbenschop please provide a reproducable example.
Hi Thijs, I am not at my computer now, but I used our CaseA dataset when I got this error on my windows machine, R3.5.1. Perhaps you can share an example using that. I had 6 keys in my example.
Sent from my iPhone
On Nov 13, 2018, at 15:59, thijsbenschop notifications@github.com wrote:
Hi,
in line 270 of ui_categorical.R, the list of variables for the importance vector is loaded to test whether all key variables were specified.
cn <- names(input)[grep("selimportance", names(input))]
However, the list cnis twice as long as the number of categorical key variables, since there exists in input for each variable input$selimportance# and input$selimportance#_selectized.
For this reason, the condition in line 442 can never be fulfilled
if (kAnon_useImportance() && any(impvec=="")) {
and as a result the blue apply button will never appear.
A solution would be to add
cn <- cn[which(!grepl("ctiz", cn))]
to remove the variable names with the suffix "_selectized".
It's not clear to me where these variables with suffix "_selectized" are generated and it seems not to happen in all instances.
I tested this on Mac OS X with R3.5.1 and sdcMicro 5.3.0.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
@bernhard-da, thank you for your quick response. I get this with any dataset when using categorical key variables and applying local suppression with an importance vector. For example:
1) load testdata 2) select roof, walls and water as cat. key variables 3) go to k-Anonimity and set "Do you want to modify importance of key variables for suppression?" to "Yes". Now the blue button will disappear, as it is supposed to. 4) Select the importance of the three key variables (1,2,3). The button doesn't reappear.
After digging into this a little deeper, it turned out that impvec
always has some empty strings, as its length is twice the number of key variables. Therefore, the above condition isn't fulfilled.
OS and versions as specified above.
@thijsbenschop @mwelch750 this was due to a update in shiny. thx for spotting and reporting
@bernhard-da, thanks for fixing
Hi,
in line 270 of ui_categorical.R, the list of variables for the importance vector is loaded to test whether all key variables were specified.
cn <- names(input)[grep("sel_importance_", names(input))]
However, the vector
cn
is twice as long as the number of categorical key variables, since there exists in input for each variable input$selimportance# and input$selimportance#_selectized.For this reason, the condition in line 442 can never be fulfilled
if (kAnon_useImportance() && any(impvec=="")) {
and as a result the blue apply button will never appear.
A solution would be to add
cn <- cn[which(!grepl("ctiz", cn))]
to remove the variable names with the suffix "_selectized".
It's not clear to me where these variables with suffix "_selectized" are generated and it seems not to happen in all instances.
I tested this on Mac OS X with R3.5.1 and sdcMicro 5.3.0.