Skip to contents

Convert Bilirubin Concentration Units

Usage

convert_bili(bili)

Arguments

bili

bilirubin concentration (µmol/L)

Value

Bilirubin concentration (mg/dL)

See also

Other unit_conversion: convert_alb(), convert_creat()

Examples

convert_bili(17.1) # ≈ 1 mg/dL
#> [1] 0.9997908
#> attr(,"units")
#> [1] "mg/dL"

df <- data.frame(
  ID = c(1, 2, 3, 4),
  BILI = c(10, 15, 25, 40)
)

df <- df %>%
  dplyr::group_by(ID) %>%
  dplyr::mutate(BILIBL = convert_bili(BILI))
df
#> # A tibble: 4 × 3
#> # Groups:   ID [4]
#>      ID  BILI BILIBL
#>   <dbl> <dbl>  <dbl>
#> 1     1    10  0.585
#> 2     2    15  0.877
#> 3     3    25  1.46 
#> 4     4    40  2.34