On Wed, 4 Jul 2018, Sven Schreiber wrote:
Am 04.07.2018 um 01:19 schrieb Allin Cottrell:
> I've had my head down in dbnomics stuff lately (informative posting to come
> before long), but I noticed in passing some comments/queries about series
> in bundles. I'm afraid I've lost the references but I'll post on the
> in general.
Perhaps one of those comments was my post from June 29th.
Yes, I think so.
> The thing to remember is that bundles are just a transport
> series. You can't "really" have a series in a bundle, since series
> to datasets and bundles know absolutely nothing about datasets; you can
> only have the ghost of a series.
> A "series" in a bundle has a status akin to a soul being rowed across the
> Styx by Charon, with the difference that it is possible to regain the
> living side under the right circumstances (the ghost-series is extracted
> into a conformable dataset).
Very nice metaphor! I wonder how this whole affair should be communicated to
script writers. Maybe it should be pointer-to-series instead of series in a
I need to look back at the doc and see what's there now. I'll try to
do that soon.
How is the "ghost" actually kept in the bundle? By ID
if so, what happens upon renumbering? Or by name?
By ID number or name would be too fragile, given that series can be
deleted or renamed. We store in the bundle an array of "doubles"
along with a record of its length. This array can be pulled back out
as a series if its length matches that of the current dataset
(either its total length or the current sample size).
Here's a little llustration:
series b.y = price
series by = b.y
smpl 3 10
series b.x = sqft
series by2 = b.y # OK
series bx = b.x
What you can't do is simply index into a "series" within a bundle:
we don't know if that's a valid operation until we try pulling it