Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #2532 Update Forumula for Body Surface Area #2541

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
4 changes: 2 additions & 2 deletions R/derive_advs_params.R
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ derive_param_bsa <- function(dataset,
#'
#' Mosteller: sqrt(height * weight / 3600)
#'
#' DuBois-DuBois: 0.20247 * (height/100) ^ 0.725 * weight ^ 0.425
#' DuBois-DuBois: 0.007184 * height ^ 0.725 * weight ^ 0.425
#'
#' Haycock: 0.024265 * height ^ 0.3964 * weight ^ 0.5378
#'
Expand Down Expand Up @@ -521,7 +521,7 @@ compute_bsa <- function(height = height,
} else if (method == "DuBois-DuBois") {
# The DuBois & DuBois formula expects the value of height in meters
# We need to convert from cm
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment should be removed now.

bsa <- 0.20247 * (height / 100)^0.725 * weight^0.425
bsa <- 0.007184 * height^0.725 * weight^0.425
} else if (method == "Haycock") {
bsa <- 0.024265 * height^0.3964 * weight^0.5378
} else if (method == "Gehan-George") {
Expand Down
2 changes: 1 addition & 1 deletion man/compute_bsa.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/testthat/test-derive_advs_params.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ test_that("compute_bsa Test 6: Mosteller method - height & weight vectors - miss
})

## compute_bsa: DuBois-DuBois method ----
# FORMULA : 0.20247 x (HGT/100)^0.725 x WGT^0.425
# FORMULA : 0.007184 x (HGT)^0.725 x WGT^0.425

## Test 7: DuBois-DuBois method - single height & weight values ----
test_that("compute_bsa Test 7: DuBois-DuBois method - single height & weight values", {
Expand Down Expand Up @@ -604,7 +604,7 @@ test_that("derive_param_bsa Test 44: BSA parameter (Mosteller Method) is correct
})

dubois <- function(hgt, wgt) {
0.20247 * (hgt / 100)^0.725 * wgt^0.425
0.007184 * hgt^0.725 * wgt^0.425
}

## Test 45: BSA parameter (DuBois-DuBois method) is correctly added ----
Expand Down
Loading