Skip to content
Prev 25141 / 63424 Next

relist, an inverse operator to unlist

# returns list(a1 = 1, a2 = 2, b = 3) with an attribute
# "reshapeLong" containing skeleton (existing reshape also uses
# "reshapeWide" and "reshapeLong" attributes)

L <- list(a = 1:2, b = 3)
long <- reshape(L, direction = "long")

# returns original list but with an attribute "reshapeWide"

reshape(long, direction = "wide")

In the last case there a new optional skeleton argument would be added.
On 5/23/07, Andrew Clausen <clausen at econ.upenn.edu> wrote: