The extract_variables function currently allows a user to extract a variable to be extracted from each universe of the multiverse and outputs it as an additional column in a data frame (output of expand.multiverse).
This should be extended to support two features:
[x] variable naming. e.g., if I declare expand(M) |> extract_variables(var1 = x1, var2 = x2) I should get column names of var1 and var2 (and not x1 and x2)
[x] support objects. e.g., I should be able to execute expand(M) |> extract_variables(mod1) where mod is any object in R
The
extract_variables
function currently allows a user to extract a variable to be extracted from each universe of the multiverse and outputs it as an additional column in a data frame (output ofexpand.multiverse
).This should be extended to support two features:
expand(M) |> extract_variables(var1 = x1, var2 = x2)
I should get column names ofvar1
andvar2
(and notx1
andx2
)expand(M) |> extract_variables(mod1)
wheremod
is any object in R