Package: phsmethods 1.1.0

Tina Fu

phsmethods: Standard Methods for Use in Public Health Scotland

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.

Authors:Public Health Scotland [cph], David Caldwell [aut], Lucinda Lawrie [rev], Jack Hannah [aut], Tina Fu [aut, cre], Ciara Gribben [aut], Chris Deans [aut], Jaime Villacampa [aut], Graeme Gowans [aut], Alice Byers [ctb], Alan Yeung [ctb], James Hayes [aut], Nicolaos Christofidis [aut]

phsmethods_1.1.0.tar.gz
phsmethods_1.1.0.zip(r-4.7)phsmethods_1.1.0.zip(r-4.6)phsmethods_1.1.0.zip(r-4.5)
phsmethods_1.1.0.tgz(r-4.6-any)phsmethods_1.1.0.tgz(r-4.5-any)
phsmethods_1.1.0.tar.gz(r-4.7-any)phsmethods_1.1.0.tar.gz(r-4.6-any)
phsmethods_1.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
phsmethods/json (API)

# Install 'phsmethods' in R:
install.packages('phsmethods', repos = c('https://public-health-scotland.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/public-health-scotland/phsmethods/issues

Pkgdown/docs site:https://public-health-scotland.github.io

Datasets:
  • area_lookup - Codes and names of Scottish geographical and administrative areas.

On CRAN:

Conda:

8.96 score 58 stars 130 scripts 504 downloads 17 exports 35 dependencies

Last updated from:a4306f931e. Checks:7 NOTE, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64NOTE162
source / vignettesOK183
linux-release-x86_64NOTE151
macos-release-arm64NOTE158
macos-oldrel-arm64NOTE214
windows-develNOTE120
windows-releaseNOTE107
windows-oldrelNOTE72
wasm-releaseOK134

Exports:age_calculateage_from_chias_percentchi_checkchi_padcreate_age_groupsdob_from_chiextract_fin_yearfile_sizeformat_postcodematch_areaNA_percent_qtrqtr_endqtr_nextqtr_prevsex_from_chi

Dependencies:bitbit64clicliprcpp11crayondplyrfarvergenericsgluehmslabelinglifecyclelubridatemagrittrpillarpkgconfigprettyunitsprogressR6RColorBrewerreadrrlangscalesstringistringrtibbletidyselecttimechangetzdbutf8vctrsviridisLitevroomwithr

Using percent vectors
Motivation | Creating percentages | Rounding | Rounding via as_percent + digits | Rounding via round() | Math with percent vectors | percent vectors and tidyverse | vectors and formatted tables | percent vectors and ggplot2

Last update: 2026-02-05
Started: 2026-02-05

Working with CHI numbers
Checking and correcting CHI numbers | Cleaning up bad CHI numbers | Inferring data from a CHI number | The structure of a CHI number | Extracting sex from CHI | Extracting Date of Birth from CHI | Extracting age from CHI

Last update: 2023-11-28
Started: 2023-11-28