Am 02.11.20 um 00:55 schrieb Riccardo (Jack) Lucchetti:
On Sun, 1 Nov 2020, Sven Schreiber wrote:
> Am 02.11.2020 um 00:31 schrieb Riccardo (Jack) Lucchetti:
>> On Sun, 1 Nov 2020, Allin Cottrell wrote:
>>
>>>> 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.
>>>>
>>>> Perhaps this could be achieved without an extra option - again, the
>>>> doc
>>>> says all positive integers for normal use; so perhaps if x is a
>>>> zero-valued series this could be taken to mean this alternative usage.
>>>
>>> Good idea. We could do that if we reckon it's worthwhile. Any takers
>>> for the idea?
>>
>> Sorry guys, I don't mean to be a spoilsport, but what is the advantage
>> compared to using "time" or "index" for this? As in
>>
>> <hansl>
>> nulldata 5
>> S = defarray("Banks", "Collins", "Gabriel",
"Hackett", "Rutherford")
>> x = index
>> stringify(x, S)
>> print x -o
>> </hansl>
>
> what if you have repeated values?
Ah ok, point taken.
Hi,
Sorry if this is a cross-post (got a bit confused here):
In case of a panel data set, one could easily make use of the $unit
accessor in case the repeated values refer to the unit-dimension.
Artur