File tree Expand file tree Collapse file tree 3 files changed +7
-26
lines changed Expand file tree Collapse file tree 3 files changed +7
-26
lines changed Original file line number Diff line number Diff line change 9
9
# ' @param group_vars Variable name(s) for classification within groups. Always computes overlap within country. `NULL`by default.
10
10
# ' @param ties Picks `'most_recent'` or `'oldest'` version when overlap is identical across multiple NUTS versions. `'most_recent'`
11
11
# ' by default.
12
- # ' @param quiet Suppress messages and warnings. `FALSE` by default.
13
12
# '
14
13
# ' @return A list of three tibbles. The first tibble contains the original data with the classified NUTS version, level, and country.
15
14
# ' 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 <-
53
52
function (data = data ,
54
53
nuts_code = nuts_code ,
55
54
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" ) {
63
56
64
57
# DEFINE CLI DIVs
65
58
# -----------------------
Original file line number Diff line number Diff line change 10
10
# ' @param missing_rm Boolean that is FALSE by default. TRUE removes regional flows that depart from missing NUTS codes.
11
11
# ' @param multiple_versions By default equal to `'break'`, throwing an error when providing multiple NUTS versions within groups.
12
12
# ' If set to `'most_frequent'` data is converted using the best-matching NUTS version.
13
- # ' @param quiet Suppress messages and warnings. `FALSE` by default.
14
13
# '
15
14
# ' @return A tibble containing NUTS codes, aggregated variable values, and possibly grouping variables.
16
15
# '
@@ -42,21 +41,16 @@ convert_nuts_level <-
42
41
variables = variables ,
43
42
weight = NULL ,
44
43
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" ) {
52
45
53
46
# DEFINE CLI DIVs
54
47
# -----------------------
55
48
cli_div(theme = list (
56
49
span.red = list (color = " red" ),
57
50
span.blue = list (color = " blue" )
51
+ )
58
52
)
59
- )
53
+
60
54
# CODE BREAKING CHECKS
61
55
# ------------------------
62
56
# Input checks
Original file line number Diff line number Diff line change 10
10
# ' @param missing_rm Boolean that is FALSE by default. TRUE removes regional flows that depart from missing NUTS codes.
11
11
# ' @param multiple_versions By default equal to `'break'`, throwing an error when providing multiple NUTS versions within groups.
12
12
# ' If set to `'most_frequent'` data is converted using the best-matching NUTS version.
13
- # ' @param quiet Suppress messages and warnings. `FALSE` by default.
14
13
# '
15
14
# ' @return A tibble containing NUTS codes, converted variable values, and possibly grouping variables.
16
15
# '
@@ -57,21 +56,16 @@ convert_nuts_version <-
57
56
variables = variables ,
58
57
weight = NULL ,
59
58
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" ) {
67
60
68
61
# DEFINE CLI DIVs
69
62
# -----------------------
70
63
cli_div(theme = list (
71
64
span.red = list (color = " red" ),
72
65
span.blue = list (color = " blue" )
66
+ )
73
67
)
74
- )
68
+
75
69
# CODE BREAKING CHECKS
76
70
# ------------------------
77
71
# Input checks
You can’t perform that action at this time.
0 commit comments