On Sun, 1 Nov 2020, Allin Cottrell wrote:
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.
Ah, I now remember what this was about. We shouldn't do it without
the user setting a special option (not available yet), but here's
the deal. Suppose I have an array of strings of length equal to the
length of the dataset (most likely, with repetition) and I want to
impose these on a "blank slate" series -- perhaps all NAs. Then I
could do
stringify(x, S, <some option>)
and I'd get a series with m distinct values, where m is the number
of distinct strings in S, with numeric codes set to match. Basically
it's a third way to create a string-valued series, besides
importation from a suitable file and stringification of a series
that already holds suitable numeric codes.
Allin