% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/parametrize.R
\name{bind_bundle_sets}
\alias{bind_bundle_sets}
\title{Combine bundles and/or bundle_sets into a single bundle_set}
\usage{
bind_bundle_sets(..., set_data = NULL)
}
\arguments{
\item{...}{Named \link{bundle} objects or \link{bundle_set} objects to combine. Each
bare \link{bundle} argument must be \strong{named} so that its label in the
resulting set is unambiguous.}

\item{set_data}{A named list of set-level metadata to attach to the
resulting \link{bundle_set}. Defaults to the \code{set_data} of the first
\link{bundle_set} input (if present) or an empty list.}
}
\value{
A \link{bundle_set} containing all input bundles.
}
\description{
Accepts any mix of named \link{bundle} objects (passed as \code{name = bundle}) or
\link{bundle_set} objects. All bundles are collected into a flat named list and
wrapped in a new \link{bundle_set}.
}
\examples{
pts <- matrix(runif(15), ncol = 3, dimnames = list(NULL, c("X", "Y", "Z")))
b1 <- bundle(streamlines = list(streamline(points = pts)))
b2 <- bundle(streamlines = list(streamline(points = pts)))

# two named bare bundles
bs <- bind_bundle_sets("sub-01" = b1, "sub-02" = b2)
bs@n_bundles   # 2
bs@bundle_names  # c("sub-01", "sub-02")

# combine two bundle_sets
bs1 <- bundle_set(list("sub-01" = b1))
bs2 <- bundle_set(list("sub-02" = b2))
bs_all <- bind_bundle_sets(bs1, bs2)
bs_all@n_bundles  # 2
}
