Skip to content

CUD2V/pccc

Repository files navigation

pccc

Pediatric Complex Chronic Conditions: A R Package

Project Status: Active – The project has reached a stable, usable state and is being actively developed. Build Status Coverage Status CRAN_Status_Badge

Motivation

Version 2 of the Pediatric Complex Chronic Conditions (CCC) system was published "Pediatric complex chronic conditions classification system version 2: updated for ICD-10 and complex medical technology dependence and transplantation" by Chris Feudtner, James A Feinstein, Wenjun Zhong, Matt Hall and Dingwei Dai.

SAS and STATA scripts to generate CCC categories from ICD codes were provided by Feudtner et al. as an appendix to the above manuscript. However, those scripts can take many hours to run on large datasets.

This package provides R functions to generate the CCC categories. Because the R functions are built with a C++ back-end, they are very computationally efficient.

Testing and Benchmarking

The PCCC package uses the R library testthat for unit tests. All tests are automatically run upon running the devtools::install_github() command shown below.

Some additional tests on large datasets were developed by Peter DeWitt and are available at https://github.com/CUD2V/pccc-testing. As 2 of the 3 require special license agreements for data access, they are not included with this repository.

Installation

From CRAN

Version 1.0.2 is available on The Comprehensive R Archive Network at https://CRAN.R-project.org/package=pccc.

Developmental version

You can install the developmental version of pccc directly from github using the devtools package:

if (!("devtools" %in% rownames(installed.packages()))) {
  warning("installing devtools from https://cran.rstudio.com")
  install.packages("devtools", repo = "https://cran.rstudio.com")
}

devtools::install_github("CUD2V/pccc", build_vignettes = TRUE)

NOTE: If you are working on a Windows machine you will need to download and install Rtools before devtools will work for you.

If you are on a Linux machine or have GNU make configured you should be able to build and install this package by cloning the repository and running

make install

Steps to prepare for release of new version on CRAN

First update all packages that pccc depends on.

Then run the following:

devtools::build()
devtools::install()
devtools::test()
devtools::check()

If all of the above are successful, then commit changes and verify CI builds have succeeded at https://travis-ci.org/github/CUD2V/pccc

Next, check to see if there are any dependencies on pccc:

devtools::revdep('pccc')

Then, do the following:

devtools::check_win_release()
devtools::check_win_devel()
devtools::check_win_oldrelease()

devtools::check_rhub()

Note: As of May 2020, R-hub Windows server requries some custom configuration:

rhub::check(
  platform="windows-x86_64-devel",
  env_vars=c(R_COMPILE_AND_INSTALL_PACKAGES = "always")
)

If datafiles used for tests are updated, use this to check compression and potentially shrink file size:

tools::checkRdaFiles('./data')
tools::resaveRdaFiles('./data')