Skip to contents

Use ckbplotr to create and style publication-quality plots. The package is focused on plots for epidemiology and is developed by a China Kadoorie Biobank and Oxford Population Health researcher.

Installation

Install the latest version of ckbplotr from the ckbiobank R-universe:

install.packages('ckbplotr',
                 repos = c('https://ckbiobank.r-universe.dev',
                           getOption('repos')))

Get started

Read vignette("ckbplotr") to get started.

Key features

The package can be used to apply CKB style and to create plots by generating ggplot2 code. Functions that create plots (such as shape_plot() and forest_plot()) return both:

  • A ggplot2 plot.
  • The ggplot2 code used to create the plot, allowing users to see exactly how the plot has been created and adapt the code for other uses. In RStudio the code will also be shown in the Viewer pane.

Citing ckbplotr

If you find this package useful, please consider citing as:

Wright N. on behalf of the China Kadoorie Biobank Collaborative Group (2026). ckbplotr: Create Plots. https://ckbiobank.github.io/ckbplotr

Package development

This package is under development and will be updated with bug fixes and additional functions related to creating plots for epidemiology. Please refer to the package documentation for guidance on usage and use GitHub issues to report bugs. This package is provided “as is” for research purposes, without warranty of any kind. The authors accept no liability for its use or for any results derived from it.