relist2

0th

Percentile

reconstruct the structure of a list

reshapes a vector according to a list template

Keywords
misc
Usage
relist2(v, l)
Arguments
v

vector, probably numeric, of values to reshape

l

template list giving structure

Details

attempts to coerce v into a list with the same structure and names as l

Value

a list with values corresponding to v and structure corresponding to l

Aliases
  • relist2
Examples
# NOT RUN {
  l = list(b=1,c=2:5,d=matrix(1:4,nrow=2))
  relist2(1:9,l)
# }
Documentation reproduced from package bbmle, version 1.0.23.1, License: GPL

Community examples

Looks like there are no examples yet.