Skip to content

neilstats/ckbplotr

Repository files navigation

ckbplotr

R build status runiverse-name runiverse-package DOI

ckbplotr helps create and style plots in R. It is developed by, and primarily for, China Kadoorie Biobank researchers.

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.

Installation

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

install.packages('ckbplotr',
                 repos = c('https://neilstats.r-universe.dev',
                           'https://cloud.r-project.org'))

This will also install dependencies from the CRAN repository.

Get started

Read vignette("ckbplotr") to get started.

Citing ckbplotr

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

Wright N (2023). ckbplotr: Create CKB Plots. https://neilstats.github.io/ckbplotr/, https://doi.org/10.5281/zenodo.6382217.

Package development

This package is under development. If you find an error or bug or have a suggestion for improvement please create an issue on GitHub or contact the author at @NeilStats@fediscience.org.