Skip to content

Commit

Permalink
Merge pull request #24 from Merck/treatment-group
Browse files Browse the repository at this point in the history
allow user to specify treatment group (#15)
  • Loading branch information
wangben718 authored Dec 20, 2023
2 parents 0aa21eb + b8ce29d commit b4f63f9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
10 changes: 6 additions & 4 deletions R/meta_forestly.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@
#' @param dataset_adsl ADSL source dataset.
#' @param dataset_adae ADAE source dataset.
#' @param population_term A character value of population term name.
#' @param observation_term A character value of observation term name.
#' @param population_subset An unquoted condition for selecting the
#' populations from ADSL dataset.
#' @param observation_term A character value of observation term name.
#' @param observation_subset An unquoted condition for selecting the
#' observations from ADAE dataset.
#' @param treatment_group A character value of treatment group name.
#' @param parameter_term A character value of parameter term name.
#'
#' @return A metalite object.
Expand All @@ -43,9 +44,10 @@ meta_forestly <- function(
dataset_adsl,
dataset_adae,
population_term,
population_subset = SAFFL == "Y",
observation_term,
population_subset = SAFFL == "Y",
observation_subset = SAFFL == "Y",
treatment_group = "TRTA",
parameter_term = "any;rel;ser") {
meta <- metalite::meta_adam(
population = as.data.frame(dataset_adsl),
Expand All @@ -59,13 +61,13 @@ meta_forestly <- function(
)) |>
metalite::define_population(
name = population_term,
group = "TRTA",
group = treatment_group,
subset = !!rlang::enquo(population_subset),
label = ""
) |>
metalite::define_observation(
name = observation_term,
group = "TRTA",
group = treatment_group,
subset = !!rlang::enquo(observation_subset),
label = ""
)
Expand Down
9 changes: 6 additions & 3 deletions man/meta_forestly.Rd

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

0 comments on commit b4f63f9

Please sign in to comment.