On Sun, 1 Nov 2020, Sven Schreiber wrote:
Am 31.10.2020 um 06:34 schrieb Artur Tarassow:
> Hi all,
> I guess I found a bug in the stringify() function. In the following example
> both "x" and "z" are constant integer series taking, for
instance, value 1.
> In case the length of the string array "S" equals nobs(series), the mapping
> is _not_ right. However, in case nelem(S) > nobs(series) things work ok.
> index y x z
> 1 1 A A A
> 2 2 B B A
> 3 3 C C A
> Obviously, the mapping is not right for x but for z.
Yes, looks like a bug and happens here, too. (older snapshot)
Hmm, curious: on looking into the code I see that the effect with
series x was apparently intended (internally), though it's not
documented and is surprising.
There is (or was, I've now disabled it in git) a special case: the
target series is constant and the number of strings equals the
number of observations in the dataset. In that case we assigned the
string values per observation. I guess it must have been some sort
of experiment that seemed to make sense at the time.