Error from the `var =...` in `define_population` and `define_observation`
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
Research direction
Reproduce the supplied example, focusing on the var arguments passed to define_population() and define_observation(). Read those function entry points and the related metadata-building path to identify why including var causes the failure; done means the example works without removing either var argument.
Written by the indexing model from the issue text.
Description
The following code doesn't work. If I get rid of var = ... from define_population() and define_observation(), it works.
adsl <- forestly_adsl # SITEID is included in ADSL
adae <- forestly_adae # SITEID is not included in ADAE
adsl$TRTA <- factor(forestly_adsl$TRT01A,
levels = c("Xanomeline Low Dose", "Placebo"),
labels = c("Low Dose", "Placebo")
)
adae$TRTA <- factor(forestly_adae$TRTA,
levels = c("Xanomeline Low Dose", "Placebo"),
labels = c("Low Dose", "Placebo")
)
meta <- meta_adam(population = adsl, observation = adae) |>
define_plan(plan = plan(
analysis = "ae_forestly",
population = "apat",
observation = "apat",
parameter = "any;drug-related"
)) |>
define_analysis(name = "ae_forestly", label = "Interactive Forest Plot") |>
define_population(
name = "apat", group = "TRTA", id = "USUBJID",
subset = SAFFL == "Y", label = "All Patient as Treated",
var = c("USUBJID", "SAFFL", "SITEID", "AGE", "SEX")
) |>
define_observation(
name = "apat", group = "TRTA",
subset = SAFFL == "Y", label = "All Patient as Treated",
var = c("USUBJID", "SAFFL","TRTA", "AEDECOD", "AEBODSYS", "AREL")
) |>
define_parameter(
name = "any",
subset = NULL,
label = "Any AEs",
var = "AEDECOD", soc = "AEBODSYS"
) |>
define_parameter(
name = "drug-related",
subset = toupper(AREL) == "RELATED",
label = "Drug-related AEs",
var = "AEDECOD", soc = "AEBODSYS"
) |>
meta_build()
meta |>
prepare_ae_forestly(ae_listing_display = c("USUBJID", "SITEID", "SEX", "RACE", "AGE")) |>
format_ae_forestly() |>
ae_forestly()
- Dominant language
- R
- Stars
- 22
- Forks
- 6
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 10
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Merck/forestly
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
briandconnelly/airnow#9 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OHDSI/CohortConstructor#774 ·
-
pre-review R TeX Track: 5 (DSAIS)
Difficulty 1/5 Under an hour Newbie friendliness 60/100
openjournals/joss-reviews#11330 · 7 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100