From b1cc28e3ec410b8046281f7a86c265bf78c795cc Mon Sep 17 00:00:00 2001 From: James McMahon Date: Mon, 1 Jul 2024 14:59:09 +0100 Subject: [PATCH] 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}. -}