https://github.com/cran/bbmle
Tip revision: 1efe3d25b4e3d86356743a59d83699cfe2e301f9 authored by Ben Bolker on 11 February 2016, 16:57:55 UTC
version 1.0.18
version 1.0.18
Tip revision: 1efe3d2
relist.Rd
\name{relist2}
\alias{relist2}
\title{reconstruct the structure of a list}
\description{
reshapes a vector according to a list template
}
\usage{
relist2(v, l)
}
\arguments{
\item{v}{vector, probably numeric, of values to reshape}
\item{l}{template list giving structure}
}
\details{
attempts to coerce \code{v} into a list with the same
structure and names as \code{l}
}
\value{
a list with values corresponding to v and structure corresponding to l
}
\author{Ben Bolker}
\examples{
l = list(b=1,c=2:5,d=matrix(1:4,nrow=2))
relist2(1:9,l)
}
\keyword{misc}