Skip to content

Commit 6438c6a

Browse files
author
AAoritz
committed
remove quiet option from function arguments
1 parent 04bacc8 commit 6438c6a

File tree

3 files changed

+7
-26
lines changed

3 files changed

+7
-26
lines changed

R/classify_nuts.R

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#' @param group_vars Variable name(s) for classification within groups. Always computes overlap within country. `NULL`by default.
1010
#' @param ties Picks `'most_recent'` or `'oldest'` version when overlap is identical across multiple NUTS versions. `'most_recent'`
1111
#' by default.
12-
#' @param quiet Suppress messages and warnings. `FALSE` by default.
1312
#'
1413
#' @return A list of three tibbles. The first tibble contains the original data with the classified NUTS version, level, and country.
1514
#' The second tibble lists the group-specific overlap with each NUTS version. The third tibble shows missing NUTS codes
@@ -53,13 +52,7 @@ classify_nuts <-
5352
function(data = data,
5453
nuts_code = nuts_code,
5554
group_vars = NULL,
56-
ties = "most_recent",
57-
quiet = FALSE) {
58-
59-
if (quiet) {
60-
old <- options(cli.default_handler = function(...) { })
61-
on.exit(options(old), add = TRUE)
62-
}
55+
ties = "most_recent") {
6356

6457
# DEFINE CLI DIVs
6558
#-----------------------

R/convert_nuts_level.R

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#' @param missing_rm Boolean that is FALSE by default. TRUE removes regional flows that depart from missing NUTS codes.
1111
#' @param multiple_versions By default equal to `'break'`, throwing an error when providing multiple NUTS versions within groups.
1212
#' If set to `'most_frequent'` data is converted using the best-matching NUTS version.
13-
#' @param quiet Suppress messages and warnings. `FALSE` by default.
1413
#'
1514
#' @return A tibble containing NUTS codes, aggregated variable values, and possibly grouping variables.
1615
#'
@@ -42,21 +41,16 @@ convert_nuts_level <-
4241
variables = variables,
4342
weight = NULL,
4443
missing_rm = FALSE,
45-
multiple_versions = "break",
46-
quiet=FALSE) {
47-
48-
if (quiet) {
49-
old <- options(cli.default_handler = function(...) { })
50-
on.exit(options(old), add = TRUE)
51-
}
44+
multiple_versions = "break") {
5245

5346
# DEFINE CLI DIVs
5447
#-----------------------
5548
cli_div(theme = list(
5649
span.red = list(color = "red"),
5750
span.blue = list(color = "blue")
51+
)
5852
)
59-
)
53+
6054
# CODE BREAKING CHECKS
6155
#------------------------
6256
# Input checks

R/convert_nuts_version.R

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#' @param missing_rm Boolean that is FALSE by default. TRUE removes regional flows that depart from missing NUTS codes.
1111
#' @param multiple_versions By default equal to `'break'`, throwing an error when providing multiple NUTS versions within groups.
1212
#' If set to `'most_frequent'` data is converted using the best-matching NUTS version.
13-
#' @param quiet Suppress messages and warnings. `FALSE` by default.
1413
#'
1514
#' @return A tibble containing NUTS codes, converted variable values, and possibly grouping variables.
1615
#'
@@ -57,21 +56,16 @@ convert_nuts_version <-
5756
variables = variables,
5857
weight = NULL,
5958
missing_rm = FALSE,
60-
multiple_versions = "break",
61-
quiet = FALSE) {
62-
63-
if (quiet) {
64-
old <- options(cli.default_handler = function(...) { })
65-
on.exit(options(old), add = TRUE)
66-
}
59+
multiple_versions = "break") {
6760

6861
# DEFINE CLI DIVs
6962
#-----------------------
7063
cli_div(theme = list(
7164
span.red = list(color = "red"),
7265
span.blue = list(color = "blue")
66+
)
7367
)
74-
)
68+
7569
# CODE BREAKING CHECKS
7670
#------------------------
7771
# Input checks

0 commit comments

Comments
 (0)