Skip to content

Commit

Permalink
documentation improvements, spell-checking
Browse files Browse the repository at this point in the history
  • Loading branch information
antaldaniel committed Dec 23, 2023
1 parent 0914978 commit 9f4cca1
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 29 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ Imports:
kableExtra,
tibble,
readxl,
rlang,
assertthat,
glue,
tidyselect
tidyselect,
rlang
Suggests:
testthat,
rmarkdown,
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion R/airpol_get.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/employment_get.R
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions R/get_saved_table.R
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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
Expand Down
6 changes: 6 additions & 0 deletions R/globals.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ utils::globalVariables(c(
"iotables_col", # <airpol_get>
"value", # <airpol_get>
"indicator", # <airpol_get>
".data", # <airpol_get>
"nace_r2", # <airpol_get>
"time", # <airpol_get>
"values", # <airpol_get>
".data", # <employment_get>
"nace_r2", # <employment_get>
"code", # <employment_get>
"variable", # <employment_get>
"iotables_label", # <employment_get>
"values", # <employment_get>
".data", # <iotable_get>
"values_lab", # <iotables_download>
"time_lab", # <iotables_download>
"uk_col", # <order_iotable>
Expand All @@ -30,6 +33,7 @@ utils::globalVariables(c(
"rowname", # <uk_2010_get>
"value", # <uk_2010_get>
".", # <uk_2010_get>
".data", # <uk_2010_get>
"uk_col_lab", # <uk_2010_get>
"uk_col", # <uk_2010_get>
"uk_row_lab", # <uk_2010_get>
Expand Down Expand Up @@ -62,6 +66,8 @@ utils::globalVariables(c(
"label", # <get_vocabulary_t_cols>
"numeric_label", # <get_vocabulary_t_cols>
"iotables_label", # <get_vocabulary_t_cols>
".data", # <get_metadata_rows>
".data", # <get_metadata_cols>
"uk_row", # <get_metadata_cols>
"uk_row_label", # <get_metadata_cols>
"prod_na", # <get_metadata_cols>
Expand Down
2 changes: 1 addition & 1 deletion R/input_multipliers_create.R
Original file line number Diff line number Diff line change
Expand Up @@ -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}.
Expand Down
2 changes: 1 addition & 1 deletion R/iotable_get.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
#' @importFrom forcats fct_reorder
#' @importFrom lubridate year
#' @importFrom utils data
#' @importFrom rlang .data

#' @family iotables import functions
#' @autoglobal
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion R/uk_2010_get.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 5 additions & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
Expand All @@ -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.
58 changes: 42 additions & 16 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -1,65 +1,79 @@
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
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
Expand All @@ -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
Expand All @@ -91,11 +112,13 @@ rOpenSci
rda
rds
readabilty
repo
rlang
ropengov
rowwise
solaris
statistiku
stk
sulphur
svg
tempdir
testthat
Expand All @@ -104,8 +127,11 @@ tibble
tidyr
tidyverse
trifluoride
ubuntu
uk
ukioanalyticaltablesio
xls
years’
za
zavod
zenodo

0 comments on commit 9f4cca1

Please sign in to comment.