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”.