gen.vunpack: Generate an unpacking method for vectors

Description Usage Arguments Value Author(s) Examples

View source: R/vpack.R

Description

Generate an unpacking method for vectors

Usage

1

Arguments

l

a list

Value

an unpacking method

Author(s)

Simon Barthelme

Examples

1
2
3
4
5
6
7
8
#A list of values that can all be coerced into a vector
l <- list(a= matrix(1:4,2,2),b = 5)
#Pack elements into a vector
vpack(l)
#For the inverse operation (getting the list back from our packed vector)
#we create an unpacking method
unpack <- gen.vunpack(l)
vpack(l) %>% unpack

dahtah/vecpack documentation built on May 12, 2017, 3:29 p.m.