On Sun, 17 Jan 2016, cociuba mihai wrote:
The help for "series" says " In the context of a genr
formula, existing
variables must be referenced by name, not ID number." but using the id of a
series is possible with other commands like "print". Is there any
possibilities to generate a series from the ID's?
Not directly, but see below.
<hansl>
open andy.gdt
print 1
# the help for "series" says " In the context of a genr formula, existing
variables must be referenced by name, not ID number."
# but using the id of a series is possible with other commands
series test= sales - price
# so isn't it possible to have something like
# series test2 = id[1]-id[2]
[...]
<hansl>
There's a varname() function but that won't do what you want:
series test2 = varname(1) - varname(2)
will fail since the value yielded by "varname(1)" is a string, not a
series. The way to do it is by using a list:
<hansl>
open data4-1.gdt
series test = price - sqft
list ID = dataset
series test2 = ID[1] - ID[2]
print test test2 -o
</hansl>
Allin Cottrell