NIPH R Packages

Registry and documentation for R packages at the Norwegian Institute of Public Health

View My GitHub Profile

NIPH/FHI R Packages

A registry of R packages developed and maintained by the Norwegian Institute of Public Health (NIPH/FHI), with a focus on supporting surveillance and analysis of infectious diseases.

Overview

R packages at NIPH are organized into two levels:

Project-level packages: Developed for specific projects or one-off analyses. May have lighter documentation and quality requirements initially.

Area-level packages: Shared infrastructure used across multiple teams and reports. Require full documentation, automated testing, and management commitment to succession planning.

Package Registry

Package Level Maintainer Status
cs9 Project Richard Aubrey White CRAN status
csalert Project Richard Aubrey White CRAN status
csdata Project Richard Aubrey White CRAN status
csdb Project Richard Aubrey White CRAN status
csmaps Project Richard Aubrey White CRAN status
csstyle Project Richard Aubrey White CRAN status
cstidy Project Richard Aubrey White CRAN status
csutil Project Richard Aubrey White CRAN status

Requirements by Level

Project-level Packages

Area-level Packages

Governance

Core Team

NIPH maintains a core team (4-5 people) responsible for:

The core team does not execute package development—developers own their packages and coordinate with the core team.

Decision Authority

The core team can:

The core team cannot:

Management Oversight

A steering group (typically area leadership) approves:

Technical Standards

Project-level: Required

Sensitive data: Packages must not contain real patient data, surveillance records, or other sensitive information. Use only synthetic or publicly available example data.

Licensing: All packages should use the MIT license unless there is a specific reason to choose otherwise.

GitHub Actions: All packages use GitHub Actions for continuous integration. The standard workflow runs R CMD check --as-cran on pushes to main and develop, and on pull requests to main. See csalert’s workflow as a reference.

Project-level: Desirable

Code style: Packages should follow the tidyverse style guide. Code should be formatted using air (see this introduction to air).

Testing: Packages should use testthat for unit testing. See the R Packages testing chapter for guidance.

Documentation: Packages should use roxygen2 for function documentation and pkgdown to generate documentation websites. Package websites are hosted on GitHub Pages at niphr.github.io/<package-name>/.

CRAN submission (if applicable):

Area-level: Required

All project-level requirements and desirables become mandatory, plus:

Testing coverage: Unit tests targeting 80%+ code coverage.

Version policy:

Dependencies: Minimize dependencies on other custom packages. If a package depends on another custom package, flag this during review. Cascade maintenance issues must be considered during approval.

Maintenance:

Getting Started

Developing a New Package

  1. Check this registry to see if a similar package already exists
  2. Discuss your idea with your team lead and the core team (to coordinate with ongoing work)
  3. Request a repository from the core team. The core team will create the repository with the standard structure (GitHub Actions, license, pkgdown configuration). Only the core team can create repos in the niphr GitHub organization.
  4. Develop and test your code following the technical standards above
  5. Submit for core team review when ready

Moving from Project to Area-level

Your package must meet all area-level requirements (see above). Submit a brief form to the core team including:

The core team will review and provide a recommendation. Final approval requires sign-off from the steering group (area leadership), which includes a commitment to provide sufficient resources to maintain the succession plan.

Resources


Last updated: 2026-01-28 For questions, contact: RichardAubrey.White@fhi.no