knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

Travis Build Status Codecov Status Build status lifecycle CRAN status

Current transpLant sUrplus Management Protocol in R

Last update: r Sys.Date()

Description

The clumpr package aims to provide a toolbox of function for model, validate and visualize dynamics assessed by the "Protocollo Nazionale per la Gestione delle Eccedenze di Tutti i Programmi di Trapianto" in Italy.

The first implementation is focused on the lung-transplant centers management.

Example

This is a basic example which shows you how it works:

library(clumpr)

# setup centers and regions
pavia   <- center('Pavia',   'Lombardia', offered = 11, p_accept = 0.8)
bergamo <- center('Bergamo', 'Lombardia', offered =  7, p_accept = 0.5)
milano  <- center('Milano',  'Lombardia', offered =  3)

lombardia <- region(set_centers(pavia, bergamo, milano), default_p = 0.2)

# show data
lombardia
get_centers(lombardia)

# setup macroregions
padova <- center('Padova', 'Veneto', 10, 0.9)
veneto <- region(set_centers(padova))

nitp <- macroregion('NITp', set_regions(lombardia, veneto),
  initial_strip = c('lombardia',  'lombardia', 'veneto'))

# show data
nitp
get_regions(nitp)
get_centers(nitp)

# add another region and setup a macroarea
torino   <- center('Torino', 'Piemonte', 7, 0.6)
piemonte <- region(set_centers(torino))

nord <- macroarea('Nord',
  macroregions = set_macroregions(piemonte, nitp)
)

nord
get_macroregions(nord)
get_regions(nord)
get_centers(nord)

roma   <- center('Roma', 'Lazio', 10, 0.9)
lazio  <- region(set_centers(roma))

sud <- macroarea('Sud',
  macroregions = set_macroregions(lazio)
)

italy <- state('Italy', set_macroareas(nord, sud))
italy

get_macroareas(italy)
get_macroregions(italy)
get_regions(italy)
get_centers(italy)

# TODO

Installation

You can install clumpr from GitHub with:

# install.packages("devtools")
devtools::install_github("UBESP-DCTV/clumpr")

Bug reports

If you encounter a bug, please file a reprex (minimal reproducible example) to https://github.com/UBESP-DCTV/clumpr/issues

Code of conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

References

Protocollo Nazionale per la Gestione delle Eccedenze di Tutti i Programmi di Trapianto (pdf)



UBESP-DCTV/clumpr documentation built on July 3, 2021, 11:23 p.m.