From 9f4cca1505250da0b1b1c7332eefae555c420acc Mon Sep 17 00:00:00 2001 From: antaldaniel Date: Sat, 23 Dec 2023 19:31:04 +0100 Subject: [PATCH] documentation improvements, spell-checking --- DESCRIPTION | 6 ++-- NAMESPACE | 1 - R/airpol_get.R | 2 +- R/employment_get.R | 2 +- R/get_saved_table.R | 4 +-- R/globals.R | 6 ++++ R/input_multipliers_create.R | 2 +- R/iotable_get.R | 2 +- R/uk_2010_get.R | 2 +- cran-comments.md | 7 +++-- inst/WORDLIST | 58 ++++++++++++++++++++++++++---------- 11 files changed, 63 insertions(+), 29 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 2a39e63..e18d6dd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -40,10 +40,10 @@ Imports: kableExtra, tibble, readxl, - rlang, assertthat, glue, - tidyselect + tidyselect, + rlang Suggests: testthat, rmarkdown, @@ -52,7 +52,7 @@ Suggests: roxyglobals Depends: R(>= 3.5.0) VignetteBuilder: knitr -Language: en-GB +Language: en-US Roxygen: list(roclets = c("collate", "namespace", "rd", "roxyglobals::global_roclet")) Config/roxyglobals/filename: globals.R diff --git a/NAMESPACE b/NAMESPACE index f81232d..eab264a 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -74,7 +74,6 @@ importFrom(knitr,kable) importFrom(lubridate,year) importFrom(magrittr,"%>%") importFrom(readxl,read_excel) -importFrom(rlang,.data) importFrom(rlang,set_names) importFrom(tibble,rownames_to_column) importFrom(tibble,tibble) diff --git a/R/airpol_get.R b/R/airpol_get.R index d769cf8..02c5fc4 100644 --- a/R/airpol_get.R +++ b/R/airpol_get.R @@ -39,7 +39,7 @@ #' @importFrom glue glue #' @importFrom assertthat assert_that #' @importFrom eurostat get_eurostat -#' @importFrom rlang .data + #' @param data_directory Defaults to \code{NULL}, if a valid directory, it will #' try to save the pre-processed data file here with labelling. #' @param force_download Defaults to \code{TRUE}. If \code{FALSE} it will use the existing downloaded file diff --git a/R/employment_get.R b/R/employment_get.R index d477961..3703dae 100644 --- a/R/employment_get.R +++ b/R/employment_get.R @@ -23,7 +23,7 @@ #' @importFrom dplyr filter select mutate left_join rename ungroup summarize group_by #' @importFrom tidyr spread #' @importFrom eurostat get_eurostat -#' @importFrom rlang .data + #' @source Eurostat statistic #' \href{https://ec.europa.eu/eurostat/web/products-datasets/-/lfsq_egan22d}{Employment #' by sex, age and detailed economic activity (from 2008 onwards, NACE Rev. 2 two digit level) - 1 000} diff --git a/R/get_saved_table.R b/R/get_saved_table.R index 6976782..3cf64db 100644 --- a/R/get_saved_table.R +++ b/R/get_saved_table.R @@ -1,7 +1,7 @@ #' @title Get an input-output table from a downloaded bulk file #' @importFrom dplyr distinct across left_join rename select any_of #' @importFrom tidyr pivot_wider unnest -#' @importFrom rlang .data + #' @keywords internal get_saved_table <- function (labelled_io_data, geo, @@ -21,7 +21,7 @@ get_saved_table <- function (labelled_io_data, #' @rdname get_saved_table #' @importFrom assertthat assert_that #' @importFrom dplyr filter -#' @importFrom rlang .data + #' @keywords internal find_saved_table <- function(labelled_io_data, geo, unit, year, stk_flow) { geo_input <- geo diff --git a/R/globals.R b/R/globals.R index 96bd857..6498e58 100644 --- a/R/globals.R +++ b/R/globals.R @@ -4,14 +4,17 @@ utils::globalVariables(c( "iotables_col", # "value", # "indicator", # + ".data", # "nace_r2", # "time", # "values", # + ".data", # "nace_r2", # "code", # "variable", # "iotables_label", # "values", # + ".data", # "values_lab", # "time_lab", # "uk_col", # @@ -30,6 +33,7 @@ utils::globalVariables(c( "rowname", # "value", # ".", # + ".data", # "uk_col_lab", # "uk_col", # "uk_row_lab", # @@ -62,6 +66,8 @@ utils::globalVariables(c( "label", # "numeric_label", # "iotables_label", # + ".data", # + ".data", # "uk_row", # "uk_row_label", # "prod_na", # diff --git a/R/input_multipliers_create.R b/R/input_multipliers_create.R index 6927996..6a93492 100644 --- a/R/input_multipliers_create.R +++ b/R/input_multipliers_create.R @@ -10,7 +10,7 @@ #' no rounding takes place. Rounding is important if you replicate examples from the literature, #' rounding differences can add up to visible differences in matrix equations. #' @importFrom dplyr select mutate across -#' @importFrom rlang .data + #' @return A data frame with the vector of multipliers and the an #' auxiliary metadata column, containing an automatically given row identifier (for joining with other matrixes) #' which can be overruled with setting \code{multiplier_name}. diff --git a/R/iotable_get.R b/R/iotable_get.R index 5dd6417..d90ba19 100644 --- a/R/iotable_get.R +++ b/R/iotable_get.R @@ -62,7 +62,7 @@ #' @importFrom forcats fct_reorder #' @importFrom lubridate year #' @importFrom utils data -#' @importFrom rlang .data + #' @family iotables import functions #' @autoglobal #' @examples diff --git a/R/uk_2010_get.R b/R/uk_2010_get.R index 37d231f..2b379d2 100644 --- a/R/uk_2010_get.R +++ b/R/uk_2010_get.R @@ -67,7 +67,7 @@ uk_2010_get <- function ( path = NULL ) { pivot_longer( -all_of("rowname"), names_to = "var", values_to="value") %>% tidyr::pivot_wider(names_from = rowname, values_from = value) %>% rlang::set_names(c("remove", "uk_col", "uk_col_lab")) %>% - dplyr::select ( -.data$remove ) %>% + dplyr::select ( -remove ) %>% mutate(across(where(is.factor), as.character)) uk_data_sheet <- readxl::read_excel ( path, diff --git a/cran-comments.md b/cran-comments.md index b33bb2e..5f73e14 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -2,9 +2,10 @@ * Windows 10, x86_64-w64-mingw32, R version 4.3.2 (2023-10-31 ucrt) * Ubuntu Linux 20.04.1 LTS, R-release, GCC on rhub * Fedora Linux, R-devel, clang, gfortran on rhub +* r-release-macosx-arm64|4.3.0|macosx|macOS 13.3.1 (22E261)|Mac mini|Apple M1||en_US.UTF-8|macOS 11.3|clang-1403.0.22.14.1|GNU Fortran (GCC) 12.2.0 on macbuilder * Windows Server 2022 x64 (build 20348), R version 4.3.2 (2023-10-31 ucrt) https://win-builder.r-project.org/ * Windows Server 2022, R-devel, 64 bit on rhub -* Appveyor R version 4.2.1 Patched (2022-09-23 r82903 ucrt) +* Appveyor R version 4.3.2 Patched (2023-12-19 r85721 ucrt) ## testthat results [ FAIL 0 | WARN 0 | SKIP 0 | PASS 87 ] @@ -13,4 +14,6 @@ 0 errors ✔ | 0 warnings ✔ | 0 notes ✔ ## Notes -The changes from the last CRAN release are minimal and relate to the change in Roxygen and tidyverse syntax. I received an email from CRAN about issues on various Linux platforms with documentation problems. These were related to changes in Roxygen that I fixed. I also fixed the change in tidyverse reference to the . pronoun (.data$ -> $) that gave warnings in tests. +- I received an email from CRAN about issues on various Linux platforms with documentation problems. These were related to changes in Roxygen that I fixed. +- I also fixed the change in tidyverse reference to the . pronoun (.data$ -> $) that gave warnings in tests, and placing global variable definitions instead when needed. +- On some testing environments I get an error when the example in iotables_download() examples is run. This is set not to run on CRAN, because it would download a large file from the Eurostat data warehouse. The error is caused when the no test is ignored and a larger files is downloaded then the assigned disk space for tests. diff --git a/inst/WORDLIST b/inst/WORDLIST index 9b1c46e..693f924 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -1,43 +1,55 @@ AEA +Acknowledgements AppVeyor Beutel -CH CMD +DOI DZS -ESMS +Državni +ESA +Eurostat +Eurostat's +Eurostat’s Fom GFCF GVA Ghosh Github -IO +HFCs +Hydrofluorocarbons IOT Interindustrial +Joerg +Jörg +Labelling Leontief MIO NAC NACE -NF -NH NMVOC NOx +Nitrous +ONS +ORCID OSX PFCs +Pre +README Rbloggers ReadMe -SDMX SIOT SIOTs SNA Spicosa +Sulphur +Tropospheric Zenodo -ac ainah airpol alterred -analyzed +analyse +analysed binded -centered codecov columnn cp @@ -45,21 +57,23 @@ csv dataobservatory deqn detailedpubversion +disaggregated doi +downloader dplyr emp env eqn -etc -flavored +fluorinated geocode gfm github halons +hexafluoride +https hydrochlorofluorocarbons ij img -incl induse industrywise inputed @@ -69,20 +83,27 @@ iotablles kable knitr kunas -labor +labelled +labelling +labour lightgrey magick magrittr malformatted metacran +micrometre +na naio nitroux -nonmetallic occassional -org +onwards +organisations ouput packageversion +pc perfluorocarbons +pre +programmatically purchasers’ pyp rOG @@ -91,11 +112,13 @@ rOpenSci rda rds readabilty +repo rlang -ropengov rowwise solaris +statistiku stk +sulphur svg tempdir testthat @@ -104,8 +127,11 @@ tibble tidyr tidyverse trifluoride +ubuntu uk ukioanalyticaltablesio xls years’ +za +zavod zenodo