% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mapper_collect.R
\name{bm_collect}
\alias{bm_collect}
\alias{bru_mapper_collect}
\alias{[.bm_collect}
\alias{[.bru_mapper_collect}
\title{Mapper for concatenated variables}
\usage{
bm_collect(mappers, hidden = FALSE)

bru_mapper_collect(...)

\method{[}{bm_collect}(x, i, drop = TRUE)

\method{[}{bru_mapper_collect}(x, i, drop = TRUE)
}
\arguments{
\item{mappers}{A list of \code{bru_mapper} objects}

\item{hidden}{\code{logical}, set to \code{TRUE} to flag that the mapper is to be used
as a first level input mapper for \code{INLA::f()} in a model that requires making
only the first mapper visible to \code{INLA::f()} and \code{INLA::inla.stack()}, such
as for "bym2" models, as activated by the \code{inla_f} argument to \code{ibm_n},
\code{ibm_values}, and \code{ibm_jacobian}. Set to \code{FALSE} to always access the full
mapper, e.g. for \code{rgeneric} models}

\item{...}{Arguments passed on to \code{\link[=bm_scale]{bm_scale()}}}

\item{x}{object from which to extract element(s)}

\item{i}{indices specifying element(s) to extract}

\item{drop}{logical;
For \verb{[.bm_collect}, whether to extract an individual mapper when
\code{i} identifies a single element. If \code{FALSE}, a list of sub-mappers is
returned (suitable e.g. for creating a new \code{bm_collect} object).
Default: \code{TRUE}}
}
\value{
\itemize{
\item \code{[}-indexing a \code{bm_collect} extracts a subset
\code{bm_collect} object (for drop \code{FALSE}) or an individual sub-mapper
(for drop \code{TRUE}, and \code{i} identifies a single element)
}
}
\description{
Constructs a concatenated collection mapping
}
\examples{
(m <- bm_collect(list(
  a = bm_index(2),
  b = bm_index(3)
), hidden = FALSE))
ibm_eval2(m, list(a = c(1, 2), b = c(1, 3, 2)), 1:5)

}
\seealso{
\link{bru_mapper}, \link{bru_mapper_generics}

Other mappers: 
\code{\link{bm_aggregate}()},
\code{\link{bm_const}()},
\code{\link{bm_factor}()},
\code{\link{bm_fm_mesh_1d}},
\code{\link{bm_fmesher}()},
\code{\link{bm_harmonics}()},
\code{\link{bm_index}()},
\code{\link{bm_linear}()},
\code{\link{bm_logitaverage}()},
\code{\link{bm_logsumexp}()},
\code{\link{bm_marginal}()},
\code{\link{bm_matrix}()},
\code{\link{bm_multi}()},
\code{\link{bm_pipe}()},
\code{\link{bm_reparam}()},
\code{\link{bm_repeat}()},
\code{\link{bm_scale}()},
\code{\link{bm_shift}()},
\code{\link{bm_sum}()},
\code{\link{bm_taylor}()},
\code{\link{bru_get_mapper}()},
\code{\link{bru_mapper}()}
}
\concept{mappers}
