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

allow user to specify treatment group (#15) #24

Merged
merged 1 commit into from
Dec 20, 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
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.