File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -388,7 +388,7 @@ unlabel_levels <- function(
388388 stop(" Expected character 'labels'" )
389389
390390 res <- log_levels [match(labels , names(log_levels ))]
391- if (! is.null(names(labels )) && any(is.na( res ) )){
391+ if (! is.null(names(labels )) && anyNA( res )){
392392 res [is.na(res )] <- as.integer(names(labels )[is.na(res )])
393393 }
394394
Original file line number Diff line number Diff line change @@ -445,15 +445,15 @@ is_candidate_key <- function(x){
445445 # !is.infinite instead of is.finite because x can be a character vector
446446 length(x ) > 1 &&
447447 all(! is.infinite(x )) &&
448- ! any(is.na( x ) ) &&
448+ ! anyNA( x ) &&
449449 identical(length(unique(x )), length(x ))
450450 } else if (is.list(x )){
451451 length(x ) > 0 &&
452452 length(x [[1 ]] > 0 ) &&
453453 do.call(is_equal_length , x ) &&
454454 all(vapply(x , function (.x ) all(! is.infinite(.x )), logical (1 ))) &&
455- all(vapply(x , function (.x ) ! any(is.na( .x ) ), logical (1 ))) &&
456- ! any(duplicated( as.data.frame(x )))
455+ all(vapply(x , function (.x ) ! anyNA( .x ), logical (1 ))) &&
456+ ! anyDuplicated( as.data.frame(x )) > 0
457457 }
458458}
459459
You can’t perform that action at this time.
0 commit comments