Skip to content

Commit

Permalink
Fixes bug when extracting dosing records form rows. This will remove …
Browse files Browse the repository at this point in the history
…the dosing records before NCA is run. Before those were being sent into the NCA analysis.
  • Loading branch information
john-harrold committed Nov 25, 2023
1 parent 1b6e5ab commit ad71d6f
Show file tree
Hide file tree
Showing 40 changed files with 84 additions and 89 deletions.
23 changes: 9 additions & 14 deletions R/NCA_Server.R
Original file line number Diff line number Diff line change
Expand Up @@ -5418,20 +5418,6 @@ nca_builder = function(state){
col_args,
paste0( ' dose_from = "', dose_from , '")[["dose_rec"]]' ))

# JMH dose_rec_fix delete
# # Creating dosing records
# cmd=c(cmd,
# "",
# "# Creating dosing records by reducing the dataset to one row for each unique:",
# "# Subject, Dose number, Grouping (optional) combination",
# paste0(nca_drec_object_name, " = "),
# paste0(" dplyr::group_by(", nca_ds_object_name,",", paste0(plus_cols, collapse=","),") |> "),
# " dplyr::filter(dplyr::row_number() == 1) |> ",
# " dplyr::ungroup() |>",
# paste0(" dplyr::select(",paste0(dose_select_cols, collapse=", "),") |> "),
# paste0(" dplyr::mutate(", col_time, " = ", col_time,"-", col_ntime ,") # Calculating the dose time from on the nominal offset")
# )
#
# Constructing dose_obj
cmd=c(cmd,
"",
Expand All @@ -5446,6 +5432,15 @@ nca_builder = function(state){
)
)

# If we dose from rows we need to strip those out
if(dose_from == "rows"){
cmd=c(cmd,
"",
"# Redusing the NCA dataset to just the observations",
paste0(nca_ds_object_name, " = dplyr::filter(", nca_ds_object_name, ", EVID == 0)")
)
}

# Constructing conc_obj
col_dur_component = NULL
if(col_dur != "N/A"){
Expand Down
2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ articles:
deployment: deployment.html
model_builder: model_builder.html
noncompartmental_analysis: noncompartmental_analysis.html
last_built: 2023-11-24T19:16Z
last_built: 2023-11-25T16:59Z

8 changes: 4 additions & 4 deletions docs/reference/MB_build_code.html

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

8 changes: 4 additions & 4 deletions docs/reference/MB_del_current_element.html

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

8 changes: 4 additions & 4 deletions docs/reference/MB_fetch_catalog.html

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

2 changes: 1 addition & 1 deletion docs/reference/MB_fetch_code.html

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

8 changes: 4 additions & 4 deletions docs/reference/MB_fetch_component.html

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

Loading

0 comments on commit ad71d6f

Please sign in to comment.