Skip to content

Commit 57b400b

Browse files
committed
Avoid T & F
1 parent af1e13d commit 57b400b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

R/classify_nuts.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ classify_nuts <-
6969
cli_abort("Input {.arg data} must be a data frame or tibble, not {.obj_type_friendly {data}}.")
7070
if (!is.character(nuts_code))
7171
cli_abort("Input {.arg nuts_code} must be provided as a string, not {.obj_type_friendly {nuts_code}}.")
72-
if (nuts_code %in% colnames(data) == F)
72+
if (nuts_code %in% colnames(data) == FALSE)
7373
cli_abort("Input {.arg nuts_code} not found in the provided data frame.")
7474
if (!ties %in% c("most_recent", "oldest"))
7575
cli_abort("Input {.arg ties} must be 'most_recent' or 'oldest'.")
@@ -82,7 +82,7 @@ classify_nuts <-
8282
rename(from_code = !!sym(nuts_code))
8383

8484
# Simple NUTS code check
85-
if (any(str_detect(data$from_code, "^[A-Za-z]{2}[A-Za-z0-9]{1,3}$") == F))
85+
if (any(str_detect(data$from_code, "^[A-Za-z]{2}[A-Za-z0-9]{1,3}$") == FALSE))
8686
cli_abort(
8787
c(
8888
"Variable {.var {nuts_code}} contains invalid NUTS codes.",

R/convert_nuts_level.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ convert_nuts_level <-
6262
if (is.null(variables))
6363
cli_abort("Input {.arg variables} cannot be NULL.")
6464

65-
if (any(names(variables) %in% colnames(data[["data"]])) == F)
65+
if (any(names(variables) %in% colnames(data[["data"]])) == FALSE)
6666
cli_abort("Input {.arg variables} not found in the provided data frame.")
6767

6868
if (any(!(unlist(variables) %in% c("absolute", "relative"))))
@@ -182,7 +182,7 @@ convert_nuts_level <-
182182
stocks <- cross_walks %>%
183183
filter(.data$from_version == .data$to_version) %>%
184184
select(-c("from_version", "to_version", "to_code")) %>%
185-
distinct(.data$from_code, .keep_all = T)
185+
distinct(.data$from_code, .keep_all = TRUE)
186186

187187
# - Expand all NUTS codes by all group combinations
188188
if (!is.null(group_vars)) {

R/convert_nuts_version.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ convert_nuts_version <-
7777
if (is.null(variables))
7878
cli_abort("Input {.arg variables} cannot be NULL.")
7979

80-
if (any(names(variables) %in% colnames(data[["data"]])) == F)
80+
if (any(names(variables) %in% colnames(data[["data"]])) == FALSE)
8181
cli_abort("Input {.arg variables} not found in the provided data frame.")
8282

8383
if (any(!(unlist(variables) %in% c("absolute", "relative"))))

0 commit comments

Comments
 (0)