% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers.R
\name{split_by_target}
\alias{split_by_target}
\title{Split estimate by target}
\usage{
split_by_target(estimate, target = NULL, npar)
}
\arguments{
\item{estimate}{[\code{numeric}]\cr
A parameter vector.}

\item{target}{[\code{character()} | \code{NULL}]\cr
The name(s) of the argument(s) over which \code{f} is optimized.

This can only be \code{numeric} arguments.

If \code{NULL} (default), the first argument of \code{f} is optimized.}

\item{npar}{[\code{integer()}]\cr
The length(s) of the target argument(s).

Must be specified if more than one target argument is specified via
the \code{target} argument.

Can be \code{NULL} if there is only one target argument, in which case \code{npar} is
set to \code{length(initial)}.}
}
\value{
A (named) \code{list}, a partition of \code{estimate} according to \code{npar}.
}
\description{
This helper function splits the solution by target parameters (if provided),
which is used for the output.
}
\author{
Siddhartha Chib
}
