Skip to content

Commit 94accd4

Browse files
author
AAoritz
committed
document verbosity control
1 parent 5013478 commit 94accd4

12 files changed

+76
-51
lines changed

DESCRIPTION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Suggests:
4141
readr,
4242
rmarkdown,
4343
sf,
44+
stringr,
4445
terra,
4546
testthat,
4647
tidyr,

R/nuts_aggregate.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#'
1414
#' @return A tibble containing NUTS codes, aggregated variable values, and possibly grouping variables.
1515
#'
16+
#' @details Console messages can be controlled with `rlang::local_options(nuts.verbose = "quiet")` to silence messages and
17+
#' `nuts.verbose = "verbose"` to switch messages back on.
1618
#'
1719
#' @examples
1820
#' library(dplyr)
@@ -26,7 +28,7 @@
2628
#'# Aggregate from NUTS 3 to 2 by indicator x year
2729
#' manure %>%
2830
#' filter(nchar(geo) == 5) %>%
29-
#' classify_nuts(nuts_code = "geo",
31+
#' nuts_classify(nuts_code = "geo",
3032
#' group_vars = c('indic_ag','time')) %>%
3133
#' # Group vars are automatically passed on
3234
#' nuts_aggregate(to_level = 2,

R/nuts_classify.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
#'
1717
#' The output can be passed to [nuts_convert_version()] to convert data across NUTS versions and [nuts_aggregate()] to aggregate across NUTS levels.
1818
#'
19+
#' @details Console messages can be controlled with `rlang::local_options(nuts.verbose = "quiet")` to silence messages and
20+
#' `nuts.verbose = "verbose"` to switch messages back on.
21+
#'
1922
#'
2023
#' @examples
2124
#' library(dplyr)

R/nuts_convert_version.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#'
1414
#' @return A tibble containing NUTS codes, converted variable values, and possibly grouping variables.
1515
#'
16+
#' @details Console messages can be controlled with `rlang::local_options(nuts.verbose = "quiet")` to silence messages and
17+
#' `nuts.verbose = "verbose"` to switch messages back on.
1618
#'
1719
#' @examples
1820
#' library(dplyr)
@@ -31,7 +33,7 @@
3133
#' filter(time == 2003) %>%
3234
#' select(-indic_ag, -time) %>%
3335
#' # Data now only varies at the NUTS code level
34-
#' classify_nuts(nuts_code = "geo") %>%
36+
#' nuts_classify(nuts_code = "geo") %>%
3537
#' nuts_convert_version(to_version = '2021',
3638
#' weight = 'pop18',
3739
#' variables = c('values' = 'absolute'))
@@ -43,7 +45,7 @@
4345
#' filter(indic_ag == 'I07A_EQ_Y') %>%
4446
#' select(-indic_ag) %>%
4547
#' # Data now varies at the year x NUTS code level
46-
#' classify_nuts(nuts_code = 'geo', group_vars = c('time')) %>%
48+
#' nuts_classify(nuts_code = 'geo', group_vars = c('time')) %>%
4749
#' nuts_convert_version(to_version = '2021',
4850
#' weight = 'pop18',
4951
#' variables = c('values' = 'absolute'))

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ pak::pak("AAoritz/nuts/")
2323

2424
Check out the [website](https://aaoritz.github.io/nuts/articles/nuts-vignette.html) for example usage and further details.
2525

26+
### Verbosity Control
27+
28+
Console messages can be controlled with `rlang::local_options(nuts.verbose = "quiet")` to silence messages and setting `nuts.verbose = "verbose"` to switch messages back on.
29+
30+
2631
### Citation
2732

2833
Please support the development of open science and data by citing the JRC and us in your work:

_pkgdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ reference:
77
- title: Functions
88
desc: Functions that classify and convert regional data
99
- contents:
10-
starts_with("convert_|classify_")
10+
starts_with("nuts_classify|nuts_aggregate|nuts_convert")
1111
- title: Data
1212
desc: Data sets required for conversion and examples
1313
- contents:

docs/index.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/pkgdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pkgdown: 2.0.7
33
pkgdown_sha: ~
44
articles:
55
nuts: nuts.html
6-
last_built: 2024-02-07T21:11Z
6+
last_built: 2024-02-20T21:42Z
77
urls:
88
reference: https://aaoritz.github.io/nuts/reference
99
article: https://aaoritz.github.io/nuts/articles

man/nuts_aggregate.Rd

Lines changed: 7 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/nuts_classify.Rd

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/nuts_convert_version.Rd

Lines changed: 8 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)