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 data_extract_input to work with "interaction" variables #41

Open
cicdguy opened this issue Aug 5, 2021 · 1 comment
Open

allow data_extract_input to work with "interaction" variables #41

cicdguy opened this issue Aug 5, 2021 · 1 comment
Labels

Comments

@cicdguy
Copy link
Contributor

cicdguy commented Aug 5, 2021

In teal.modules.clinical::tm_a_mmrm, one of the variables needed for the analysis allows for "interaction" terms. These are passed into the template in this form: variable1:variable2 or variable1*variable2.

If we are using a data_extract_input and data_merge_module, these variables do not exist in the data - but their component variables do (and they must).

What we need from data_extract_input is to optionally accept some split criteria to separate interaction selections into their component variables. Or maybe this has to be done at the data_merge_module level.

The goal is to enable something like this:

data_extract_spec(
  dataname = dataname,
  select =   select_spec(
    choices = c("BASE", "AGE", "SEX", "BASE:AVISIT")
  )
)

Such that the data_extract_input shows this in the module:

image

But is doing this behind the scenes (Show R Code):

image

Note how the "variables" being selected are BASE, AVISIT, and SEX (BASE:AVISIT has been split).

You may see the current workaround in tm_a_mmrm which currently uses 2 data_extract_inputs to accomplish this.

Provenance:

Creator: SUNDRELV
@gogonzo gogonzo transferred this issue from another repository Apr 8, 2022
@nikolas-burkoff
Copy link
Contributor

so I think we can now do this see here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants