Learn R Programming

ricu

Working with ICU datasets, especially with publicly available ones as provided by PhysioNet in R is facilitated by ricu, which provides data access, a level of abstraction to encode clinical concepts in a data source agnostic way, as well as classes and utilities for working with the arising types of time series datasets.

Installation

Currently, installation is only possible from github directly, using the remotes if installed

remotes::install_github("eth-mds/ricu")

or by sourcing the required code for installation from github by running

rem <- source(
  paste0("https://raw.githubusercontent.com/r-lib/remotes/main/",
         "install-github.R")
)
rem$value("eth-mds/ricu")

In order to make sure that some useful utility packages are installed as well, consider installing the packages marked as Suggests as well by running

remotes::install_github("eth-mds/ricu", dependencies = TRUE)

instead, or by installing some of the utility packages (relevant for downloading and preprocessing PhysioNet datasets)

install.packages("xml2")

and demo dataset packages

install.packages(c("mimic.demo", "eicu.demo"),
                 repos = "https://eth-mds.github.io/physionet-demo")

explicitly.

Data access

Out of the box (provided the two data packages mimic.demo and eicu.demo are available), ricu provides access to the demo datasets corresponding to the PhysioNet Clinical Databases eICU and MIMIC-III. Tables are available as

mimic_demo$admissions

and data can be loaded into an R session for example using

load_ts("labevents", "mimic_demo", itemid == 50862L,
        cols = c("valuenum", "valueuom"))

which returns time series data as ts_tbl object.

Acknowledgments

This work was supported by grant #2017-110 of the Strategic Focal Area “Personalized Health and Related Technologies (PHRT)” of the ETH Domain for the SPHN/PHRT Driver Project “Personalized Swiss Sepsis Study”.

Copy Link

Version

Install

install.packages('ricu')

Monthly Downloads

324

Version

0.5.6

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Nicolas Bennett

Last Published

September 4th, 2023

Functions in ricu (0.5.6)

col_renamer

Internal utilities for ICU data classes
transform_fun

Item callback utilities
change_id

Switch between id types
new_cncpt

Data Concepts
sofa_score

SOFA score label
load_dictionary

Load concept dictionaries
attach_src

Data attach utilities
pafi

Concept callback functions
msg_progress

Message signaling nested with progress reporting
add_concept

Internal item callback utilities
secs

Utilities for difftime
import_src

Data import utilities
download_src

Data download utilities
data_dir

File system utilities
data

ICU datasets
write_psv

Read and write utilities
new_itm

Data items
id_tbl

Tabular ICU data classes
id_origin

Data loading utilities
prepare_query

Internal utilities for item/concept objects
sep3

Sepsis 3 label
load_id

Load data as id_tbl or ts_tbl objects
setup_src_data

Data setup
load_concepts

Load concept data
load_src

Low level functions for loading data
susp_inf

Suspicion of infection label
sirs_score

SIRS score label
new_src_cfg

Internal utilities for working with data source configurations
load_src_cfg

Load configuration for a data source
ricu-package

ricu: Intensive Care Unit Data with R
rename_cols

ICU class data utilities
id_vars

ICU class meta data utilities
expand

Time series utility functions
min_or_na

Utility functions
unclass_tbl

Internal utilities for ICU data objects
stay_windows

Stays
cbind_id_tbl

ICU class data reshaping
new_src_tbl

Data source environments