Converts an object (e.g., a hyperdesign) into a single multidesign object by collapsing its structure.
Converts a hyperdesign object into a single multidesign by row-stacking the data matrices and combining the design data frames. All blocks must have the same number of columns and identical column designs.
See also
hyperdesign for creating hyperdesign objects,
multidesign for the multidesign class
Other hyperdesign functions:
design.hyperdesign(),
df_to_hyperdesign(),
hyperdesign.list(),
init_transform.hyperdesign(),
subset.hyperdesign(),
xdata.hyperdesign()
Examples
d1 <- multidesign(matrix(rnorm(10*5), 10, 5),
data.frame(condition = rep(c("A","B"), 5)))
d2 <- multidesign(matrix(rnorm(10*5), 10, 5),
data.frame(condition = rep(c("A","B"), 5)))
hd <- hyperdesign(list(d1, d2))
# Collapse hyperdesign to a single multidesign
md <- as_multidesign(hd)
d1 <- multidesign(matrix(rnorm(10*5), 10, 5),
data.frame(condition = rep(c("A","B"), 5)))
d2 <- multidesign(matrix(rnorm(10*5), 10, 5),
data.frame(condition = rep(c("A","B"), 5)))
hd <- hyperdesign(list(d1, d2))
md <- as_multidesign(hd)