tests/testthat/test_metric_conversion.R

test_that("cm --> inch", {
  expect_equal(round(cm2inch(cm = 100), 2), 39.37)
})

test_that("inch --> cm", {
  expect_equal(round(inch2cm(inch = 39.37), 2), 100)
})

test_that("kg --> lbs", {
  expect_equal(round(kg2lbs(kg = 100), 2), 220.46)
})

test_that("lbs --> kg", {
  expect_equal(round(lbs2kg(lbs = 220.462), 2), 100)
})

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.