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

Standardize function name to exclude_nca_count_conc_measured() #377

Merged
merged 1 commit into from
Jan 29, 2025
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
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export(clean.conc.blq)
export(clean.conc.na)
export(cov_holder)
export(exclude)
export(exclude_nca_conc_count_measured)
export(exclude_nca_count_conc_measured)
export(exclude_nca_max.aucinf.pext)
export(exclude_nca_min.hl.r.squared)
export(exclude_nca_span.ratio)
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ the dosing including dose amount and route.
names in the `conc.blq` argument (`before.tmax`,`after.tmax`)
* A new parameter `count_conc_measured` was added to enable quality checks,
typically on AUC measurements. An associated exclusion function,
`exclude_nca_conc_count_measured()` was also added.
`exclude_nca_count_conc_measured()` was also added.
* The `PKNCAconc()` arguments of `include_half.life` and `exclude_half.life` now
allow `NA` values. If all values are `NA`, then no inclusion or exclusion is
applied (the interval is treated as-is, like the argument had not been given).
Expand Down
2 changes: 1 addition & 1 deletion R/exclude_nca.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ exclude_nca_max.aucinf.pext <- function(max.aucinf.pext) {
#' @param exclude_param_pattern Character vector of regular expression patterns
#' to exclude
#' @export
exclude_nca_conc_count_measured <- function(min_count, exclude_param_pattern = c("^aucall", "^aucinf", "^aucint", "^auciv", "^auclast", "^aumc", "^sparse_auc")) {
exclude_nca_count_conc_measured <- function(min_count, exclude_param_pattern = c("^aucall", "^aucinf", "^aucint", "^auciv", "^auclast", "^aumc", "^sparse_auc")) {
all_parameters <- names(PKNCA::get.interval.cols())
affected_parameters_base <-
sort(unique(unlist(
Expand Down
6 changes: 3 additions & 3 deletions man/exclude_nca.Rd

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

6 changes: 3 additions & 3 deletions tests/testthat/test-exclude_nca.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ test_that("exclude_nca", {
info="Result is ignored when not calculated")
})

test_that("exclude_nca_conc_count_measured", {
test_that("exclude_nca_count_conc_measured", {
my_conc <- PKNCAconc(data.frame(conc=c(1.1^(c(3:0, -Inf)), 1.1), time=0:5, subject = 1), conc~time|subject)
my_data <- PKNCAdata(my_conc, intervals=data.frame(start=0, end=Inf, aucinf.obs=TRUE, aucpext.obs=TRUE, count_conc_measured = TRUE))
suppressMessages(
Expand All @@ -58,12 +58,12 @@ test_that("exclude_nca_conc_count_measured", {
as.data.frame(my_result)$exclude,
rep(NA_character_, 15)
)
my_result_exclude5 <- exclude(my_result, FUN = exclude_nca_conc_count_measured(min_count = 5))
my_result_exclude5 <- exclude(my_result, FUN = exclude_nca_count_conc_measured(min_count = 5))
expect_equal(
as.data.frame(my_result_exclude5)$exclude,
rep(NA_character_, 15)
)
my_result_exclude10 <- exclude(my_result, FUN = exclude_nca_conc_count_measured(min_count = 10))
my_result_exclude10 <- exclude(my_result, FUN = exclude_nca_count_conc_measured(min_count = 10))
expect_equal(
as.data.frame(my_result_exclude10)$exclude,
c("Number of measured concentrations is < 10", rep(NA_character_, 12), rep("Number of measured concentrations is < 10", 2))
Expand Down
Loading