On Sat, 17 Nov 2012, Lee Adkins wrote:
Can a bundle contain a list? If so, how? If not, are there
any preferred workarounds?
You cannot add a list to a bundle directly. But you can "cast" a
list to a matrix (vector) and add that to the bundle.
<hansl>
open data4-10
list ylist = ENROLL CATHOL PUPIL
matrix ymat = ylist
bundle b
b["ymat"] = ymat
list L = b["ymat"]
list L print
</hansl>
However, you'd have to be careful doing this sort of thing, since
bundles can outlast datasets. There's no guarantee that a "list"
contained in a bundle (in matrix form) has any validity as a list at
the time it's extracted.
The same goes for series. You can add a series to a bundle, but this
is really just a shortcut for converting the series to a matrix and
storing the matrix. When it comes time to extract it, it may or may
not be interpretable as a series.
Allin