c() takes the union of the scenarios in several pima.multi objects.
The analytical choices within each object are left as they were generated by
create_multi(); choices from different objects are not crossed.
Usage
# S3 method for class 'pima.multi'
c(..., recursive = FALSE)Value
A pima.multi object. Model and formula identifiers are reassigned
so they are unique in the result. The .source column identifies the
originating object. Specification columns absent from a block contain
NA for its rows. All inputs must either have fitted models or have none.
See also
Other multiverse construction:
create_fit(),
create_multi(),
subset.pima.multi()
Examples
a <- create_multi(
Sepal.Width ~ Sepal.Length + Petal.Width,
data = iris, focal = "Sepal.Length",
fit.specs = list(lm = stats::lm)
)
b <- create_multi(
Sepal.Width ~ Sepal.Length + Species,
data = iris, focal = "Sepal.Length",
fit.specs = list(lm = stats::lm)
)
both <- c(width = a, species = b)
both$scenarios
#> model formula_id calls y.fun
#> 1 model1 formula1 Sepal.Width ~ Sepal.Length identity
#> 2 model2 formula2 Sepal.Width ~ Sepal.Length + Petal.Width identity
#> 3 model3 formula3 Sepal.Width ~ Sepal.Length identity
#> 4 model4 formula4 Sepal.Width ~ Sepal.Length + Species identity
#> spec_Sepal.Length spec_Petal.Width subset fit_spec nx ny fit_ok fit_error
#> 1 identity excluded all lm 1 1 TRUE <NA>
#> 2 identity identity all lm 2 1 TRUE <NA>
#> 3 identity <NA> all lm 1 1 TRUE <NA>
#> 4 identity <NA> all lm 2 1 TRUE <NA>
#> .source spec_Species
#> 1 width <NA>
#> 2 width <NA>
#> 3 species excluded
#> 4 species identity