Package: phsmethods 1.1.0
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:
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
- area_lookup - Codes and names of Scottish geographical and administrative areas.
Last updated from:a4306f931e. Checks:7 NOTE, 2 OK. Indexed: yes.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel-x86_64 | NOTE | 162 | ||
| source / vignettes | OK | 183 | ||
| linux-release-x86_64 | NOTE | 151 | ||
| macos-release-arm64 | NOTE | 158 | ||
| macos-oldrel-arm64 | NOTE | 214 | ||
| windows-devel | NOTE | 120 | ||
| windows-release | NOTE | 107 | ||
| windows-oldrel | NOTE | 72 | ||
| wasm-release | OK | 134 |
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
Last update: 2026-02-05
Started: 2026-02-05
Last update: 2023-11-28
Started: 2023-11-28
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| Calculate age between two dates | age_calculate |
| Extract age from the CHI number | age_from_chi |
| Codes and names of Scottish geographical and administrative areas. | area_lookup |
| Percentages | as_percent NA_percent_ |
| Check the validity of a CHI number | chi_check |
| Add a leading zero to nine-digit CHI numbers | chi_pad |
| Create age groups | create_age_groups |
| Extract Date of Birth (DoB) from the CHI number | dob_from_chi |
| Extract the formatted financial year from a date | extract_fin_year |
| Format a postcode | format_postcode |
| Translate geography codes into area names | match_area |
| Assign a date to a quarter | qtr qtr_end qtr_next qtr_prev |
| Extract sex from the CHI number | sex_from_chi |
