Skip to content

Commit

Permalink
Merge pull request #8719 from N-thony/fix_partiallylabelledcolumns
Browse files Browse the repository at this point in the history
Fixed bug in Column Selection > Partially labelled option
  • Loading branch information
conlooptechnologies authored Jan 30, 2024
2 parents ac3f5a6 + 1d8c872 commit 2270a49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion instat/static/InstatObject/R/stand_alone_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -2556,7 +2556,9 @@ is.containValueLabel <- function(x){

is.containPartialValueLabel <- function(x) {
if(is.containValueLabel(x)) {
return(!all(x[!is.na(x)] %in% attr(x, labels_label)))
levelCounts <- table(x)
return(!all(x[!is.na(x)] %in% attr(x, labels_label)) &&
sum(levelCounts == 0) == 0)
}
else{return(FALSE)}
}
Expand Down

0 comments on commit 2270a49

Please sign in to comment.