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

add Calvert equation for carboplatin #54

Merged
merged 3 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export(calc_amts_for_conc)
export(calc_baseline_scr)
export(calc_bmi)
export(calc_bsa)
export(calc_carboplatin_calvert)
export(calc_creat)
export(calc_creat_neo)
export(calc_dosing_weight)
Expand Down
25 changes: 25 additions & 0 deletions R/calc_carboplatin_calvert.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#' Calvert equation for carboplatin
#'
#' The Calvert equation calculates a dose expected to bring the patient to the
#' target AUC given their glomerular filtration rate (GFR). The original
#' equation was developed on a data set of 18 individuals with GFR of
#' 33-136 ml/min.
#'
#' @references \href{https://ascopubs.org/doi/abs/10.1200/JCO.1989.7.11.1748}{
#' Calvert et al., Journal of Clinical Oncology (1976)}
#'
#' @param target_auc target AUC, in mg/ml-min, typically between 2-8 mg/ml-min
#' @param gfr glomerular filtration rate, in ml/min. See also
#' `clinPK::calc_egfr`.
#' @param ... arguments passed on to `calc_egfr` if gfr is not supplied
#' @examples
#' calc_carboplatin_calvert(5, 100)
#' calc_carboplatin_calvert(4, 30)
#' calc_carboplatin_calvert(2, sex = "male", age = 50, scr = 1.1, weight = 70)
#'
#' @export

calc_carboplatin_calvert <- function(target_auc, gfr = NULL, ...) {
if (is.null(gfr)) gfr <- calc_egfr(..., relative=FALSE)[["value"]]
target_auc * (1.2 * gfr + 20)
}
26 changes: 26 additions & 0 deletions man/calc_carboplatin_calvert.Rd

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

37 changes: 37 additions & 0 deletions tests/testthat/test_calc_carboplatin_calvert.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
test_that("calvert eqn with egfr supplied", {
expect_equal(calc_carboplatin_calvert(5, 100), 700)
expect_equal(calc_carboplatin_calvert(4, 30), 224)
})

test_that("calvert eqn with egfr supplied", {
expect_equal(
calc_carboplatin_calvert(
5,
sex = "male",
age = 50,
scr = 1.1,
weight = 70,
verbose = FALSE
),
577.27273
)
})

test_that("calvert eqn uses absolute egfr", {
expect_equal(
round(
calc_carboplatin_calvert(
5,
sex = "male",
age = 5,
scr = 1.1,
weight = 15,
height = 90,
method = "schwartz_revised",
verbose = FALSE
),
2
),
169.49
)
})