Learn R Programming

clinPK (version 0.13.0)

convert_bilirubin_unit: Convert bilirubin from / to units

Description

Accepted units are "mg_dl" and "micromol_l". Arguments supplied to `value` and `unit_in` units must be of the same length. "To" unit must be of length 1. #'

Usage

convert_bilirubin_unit(
  value,
  unit_in = valid_units("bilirubin"),
  unit_out = valid_units("bilirubin")
)

Arguments

value

bilirubin measurements

unit_in

from unit, e.g. `"g_l"`.

unit_out

to flow unit, e.g. `"g_dl"`

Examples

Run this code

## single values
convert_bilirubin_unit(1, "mg_dl", "micromol_l")

## vectorized
convert_bilirubin_unit(
  c(1, 1.1, 1.2),
  unit_in = "mg_dl",
  unit_out = "micromol_l"
)

Run the code above in your browser using DataLab