On Wed, 4 Dec 2019, Allin Cottrell wrote:
Well, the intent is to preserve the integrity of such series. We
obviously
couldn't have anything like series foo = log(foo) and still have a
string-valued series.
Some time ago, I found it quite difficult to manipulate string-valued
series in the cointext of a problem when I was importing stuff from CSV
and I had to manipulate the resulting series. I can't recall exactly what
the problem was, but one thing I do remember is that if you stringify a
series from within a function, that information is lost when you return
the series. Instead, if you pass the series via a pointer, you can get the
job done, but it'd be nice if it worked with the former approach too.
Example script to illustrate the problem:
<hansl>
function series one(series x)
lab = defarray("a", "b", "c")
ret = x
stringify(ret, lab)
print ret -o # check
return ret
end function
function void two(series *x)
lab = defarray("a", "b", "c")
stringify(x, lab)
end function
set verbose off
set seed 9898
nulldata 10
series a = randgen(i,1,3)
b = one(a)
two(&a)
print a b -o
</hansl>
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------