File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ classify_nuts <-
69
69
cli_abort("Input {.arg data} must be a data frame or tibble, not {.obj_type_friendly {data}}.")
70
70
if (!is.character(nuts_code))
71
71
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 )
73
73
cli_abort("Input {.arg nuts_code} not found in the provided data frame.")
74
74
if (!ties %in% c("most_recent", "oldest"))
75
75
cli_abort("Input {.arg ties} must be 'most_recent' or 'oldest'.")
@@ -82,7 +82,7 @@ classify_nuts <-
82
82
rename(from_code = !!sym(nuts_code))
83
83
84
84
# 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 ))
86
86
cli_abort(
87
87
c(
88
88
"Variable {.var {nuts_code}} contains invalid NUTS codes.",
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ convert_nuts_level <-
62
62
if (is.null(variables))
63
63
cli_abort("Input {.arg variables} cannot be NULL.")
64
64
65
- if (any(names(variables) %in% colnames(data[["data"]])) == F )
65
+ if (any(names(variables) %in% colnames(data[["data"]])) == FALSE )
66
66
cli_abort("Input {.arg variables} not found in the provided data frame.")
67
67
68
68
if (any(!(unlist(variables) %in% c("absolute", "relative"))))
@@ -182,7 +182,7 @@ convert_nuts_level <-
182
182
stocks <- cross_walks %>%
183
183
filter(.data$from_version == .data$to_version) %>%
184
184
select(-c("from_version", "to_version", "to_code")) %>%
185
- distinct(.data$from_code, .keep_all = T )
185
+ distinct(.data$from_code, .keep_all = TRUE )
186
186
187
187
# - Expand all NUTS codes by all group combinations
188
188
if (!is.null(group_vars)) {
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ convert_nuts_version <-
77
77
if (is.null(variables))
78
78
cli_abort("Input {.arg variables} cannot be NULL.")
79
79
80
- if (any(names(variables) %in% colnames(data[["data"]])) == F )
80
+ if (any(names(variables) %in% colnames(data[["data"]])) == FALSE )
81
81
cli_abort("Input {.arg variables} not found in the provided data frame.")
82
82
83
83
if (any(!(unlist(variables) %in% c("absolute", "relative"))))
You can’t perform that action at this time.
0 commit comments