context("test-r-muscle.R")
test_that("calculate_muscle_mass works", {
expect_equal(
calculate_muscle_mass(
180,
sex = "male",
fg = 24,
cg = 34,
c_skinfold = 100,
tg = 55,
t_skinfold = 100
),
13.56,
tolerance = 0.1
)
# expect erorr when sex == female
expect_error(
calculate_muscle_mass(
180,
sex = "female",
fg = 24,
cg = 34,
c_skinfold = 100,
tg = 55,
t_skinfold = 100
)
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.