options(crayon.enabled = TRUE)
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
library(ricu)
old.hooks <- fansi::set_knit_hooks(knitr::knit_hooks)

ricu

Lifecycle R build status R check status pkgdown build status covr status Codecov test coverage

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("septic-tank/ricu")

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

rem <- source(
  paste0("https://raw.githubusercontent.com/r-lib/remotes/master/",
         "install-github.R"
)
rem$value("septic-tank/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("septic-tank/ricu", dependencies = TRUE)

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

install.packages(c("getPass", "keyring", "openssl", "xml2"))

and demo dataset packages

install.packages(c("mimic.demo", "eicu.demo"),
                 repos = "https://septic-tank.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, c("valuenum", "valueuom"))

which returns time series data as ts_tbl object.



septic-tank/ricu documentation built on Jan. 30, 2021, 8:40 p.m.