tests/testthat/test_conc2mol.R

test_that("Conc --> mol", {
  expect_equal(
    conc2mol(
      conc = 1,
      mol_weight = 100,
      unit_conc = "g/L",
      unit_mol = "mol/L"
    )$value,
    0.01
  )
  expect_equal(
    conc2mol(
      conc = 1,
      mol_weight = 100,
      unit_conc = "mg/L",
      unit_mol = "mol/L"
    )$value,
    1e-5
  )
})

Try the clinPK package in your browser

Any scripts or data that you put into this service are public.

clinPK documentation built on May 9, 2022, 9:06 a.m.