Skip to content

Commit

Permalink
Merge pull request #3 from Boehringer-Ingelheim/2-bug-na-value-handling
Browse files Browse the repository at this point in the history
Add na.rm to max call in prepare_initial_data()
  • Loading branch information
mattkorb authored Aug 19, 2024
2 parents 797b234 + c6a5b96 commit 8df7105
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: dv.edish
Type: Package
Title: eDISH Plot Module for DILI assessment
Version: 1.0.3
Version: 1.0.4
Authors@R:
c(
person("Boehringer-Ingelheim Pharma GmbH & Co.KG", role = c("cph", "fnd")),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# dv.edish 1.0.4

- The module ignores now NA values when calculating the maximum value.

# dv.edish 1.0.3

- Initial release of dv.edish package to GitHub.
Expand Down
2 changes: 1 addition & 1 deletion R/helper_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ prepare_initial_data <- function(
dataset <- Reduce(dplyr::full_join, sel_dataset_list) %>%
dplyr::filter(.data[[lb_test_var]] %in% lb_test_choices) %>%
dplyr::group_by(.data[[subjectid_var]], .data[[arm_var]], .data[[lb_test_var]], .data[[visit_var]]) %>%
dplyr::filter(.data[[lb_result_var]] == max(.data[[lb_result_var]])) %>%
dplyr::filter(.data[[lb_result_var]] == max(.data[[lb_result_var]], na.rm = TRUE)) %>%
dplyr::distinct() %>%
dplyr::ungroup()

Expand Down

0 comments on commit 8df7105

Please sign in to comment.