From b1cc28e3ec410b8046281f7a86c265bf78c795cc Mon Sep 17 00:00:00 2001 From: James McMahon Date: Mon, 1 Jul 2024 14:59:09 +0100 Subject: [PATCH 1/3] Update Roxygen version I also followed the advice to remove the deprecated tag `@docType package` and instead document the special object `"_PAKCAGE"`. I used `usethis::use_package_doc()` for this and then moved the `@importFrom`s. The change for users here is that the top-level documentation available to users in R should be easier to get to (more aliases) and will have better content (since it will now auto-populate from the DESCRIPTION file. --- DESCRIPTION | 2 +- R/phsmethods-package.R | 11 ++++++++++ R/phsmethods.R | 20 ------------------ man/phsmethods-package.Rd | 44 +++++++++++++++++++++++++++++++++++++++ man/phsmethods.Rd | 13 ------------ 5 files changed, 56 insertions(+), 34 deletions(-) create mode 100644 R/phsmethods-package.R delete mode 100644 R/phsmethods.R create mode 100644 man/phsmethods-package.Rd delete mode 100644 man/phsmethods.Rd diff --git a/DESCRIPTION b/DESCRIPTION index d8dbd33..dc1074f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -56,5 +56,5 @@ Encoding: UTF-8 Language: en-GB LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 VignetteBuilder: knitr diff --git a/R/phsmethods-package.R b/R/phsmethods-package.R new file mode 100644 index 0000000..e896a15 --- /dev/null +++ b/R/phsmethods-package.R @@ -0,0 +1,11 @@ +#' @importFrom magrittr %>% +#' @importFrom magrittr %<>% +#' @importFrom rlang .data +#' @importFrom tibble tibble +#' @importFrom lifecycle deprecated +#' @keywords internal +"_PACKAGE" + +## usethis namespace: start +## usethis namespace: end +NULL diff --git a/R/phsmethods.R b/R/phsmethods.R deleted file mode 100644 index 8197566..0000000 --- a/R/phsmethods.R +++ /dev/null @@ -1,20 +0,0 @@ -#' `phsmethods` package -#' -#' Standard Methods for use in PHS. -#' -#' See the README on -#' [GitHub](https://github.com/Public-Health-Scotland/phsmethods#readme). -#' -#' @docType package -#' @name phsmethods -#' @importFrom magrittr %>% -#' @importFrom magrittr %<>% -#' @importFrom rlang .data -#' @importFrom tibble tibble -#' @importFrom lifecycle deprecated -NULL - -# Stops notes from appearing in R CMD check because of undefined global -# variable '.' and allows area_lookup dataset to be used inside match_area -# function -if (getRversion() >= "2.15.1") utils::globalVariables(c(".", "area_lookup")) diff --git a/man/phsmethods-package.Rd b/man/phsmethods-package.Rd new file mode 100644 index 0000000..e4a01e7 --- /dev/null +++ b/man/phsmethods-package.Rd @@ -0,0 +1,44 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/phsmethods-package.R +\docType{package} +\name{phsmethods-package} +\alias{phsmethods} +\alias{phsmethods-package} +\title{phsmethods: Standard Methods for Use in Public Health Scotland} +\description{ +A collection of methods for commonly undertaken analytical tasks, primarily developed for Public Health Scotland (PHS) analysts, but the package is also generally useful to others working in the healthcare space, particularly since it has functions for working with Community Health Index (CHI) numbers. The package can help to make data manipulation and analysis more efficient and reproducible. +} +\seealso{ +Useful links: +\itemize{ + \item \url{https://github.com/Public-Health-Scotland/phsmethods} + \item \url{https://public-health-scotland.github.io/phsmethods/} + \item Report bugs at \url{https://github.com/Public-Health-Scotland/phsmethods/issues} +} + +} +\author{ +\strong{Maintainer}: Tina Fu \email{Yuyan.Fu2@phs.scot} + +Authors: +\itemize{ + \item David Caldwell \email{David.Caldwell@phs.scot} + \item Jack Hannah \email{jack.hannah2@phs.scot} + \item Ciara Gribben \email{Ciara.Gribben@phs.scot} + \item Chris Deans \email{Chris.Deans2@phs.scot} + \item Jaime Villacampa \email{Jaime.Villacampa@phs.scot} + \item Graeme Gowans \email{Graeme.Gowans@phs.scot} + \item James McMahon \email{James.McMahon@phs.scot} (\href{https://orcid.org/0000-0002-5380-2029}{ORCID}) + \item Nicolaos Christofidis \email{nicolaos.christofidis@phs.scot} +} + +Other contributors: +\itemize{ + \item Public Health Scotland \email{phs.datascience@phs.scot} [copyright holder] + \item Lucinda Lawrie \email{Lucinda.Lawrie@phs.scot} [reviewer] + \item Alice Byers [contributor] + \item Alan Yeung \email{Alan.Yeung@phs.scot} [contributor] +} + +} +\keyword{internal} diff --git a/man/phsmethods.Rd b/man/phsmethods.Rd deleted file mode 100644 index 64143ac..0000000 --- a/man/phsmethods.Rd +++ /dev/null @@ -1,13 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/phsmethods.R -\docType{package} -\name{phsmethods} -\alias{phsmethods} -\title{\code{phsmethods} package} -\description{ -Standard Methods for use in PHS. -} -\details{ -See the README on -\href{https://github.com/Public-Health-Scotland/phsmethods#readme}{GitHub}. -} From e6fcf4115dd01b89a89ebfe2734e3198ab46901d Mon Sep 17 00:00:00 2001 From: Moohan Date: Mon, 1 Jul 2024 14:02:47 +0000 Subject: [PATCH 2/3] Update documentation --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index dc1074f..be42799 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -56,5 +56,5 @@ Encoding: UTF-8 Language: en-GB LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 VignetteBuilder: knitr From 355c976ab5c8061174d4ab8a8555fe8c14c66649 Mon Sep 17 00:00:00 2001 From: James McMahon Date: Mon, 21 Oct 2024 11:38:30 +0100 Subject: [PATCH 3/3] Fix incorrect doc tag --- R/make_inheritance_checks.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/make_inheritance_checks.R b/R/make_inheritance_checks.R index 1212f94..92b6255 100644 --- a/R/make_inheritance_checks.R +++ b/R/make_inheritance_checks.R @@ -6,7 +6,7 @@ #' @param target_classes character vector of the classes to check for. #' @param ignore_null boolean. Indicates whether to ignore arguments with value #' NULL (TRUE) or to throw an exception (FALSE). Default = TRUE. -#' @internal +#' @keywords internal #' @noRd make_inheritance_checks <- function(arguments, target_classes,