Page 1 of 1

series attribute by number

Posted: Sun Nov 24, 2019 11:30 am
by xprimexinverse
Hi,
@attr(“arg”) string containing the value of the arg attribute, where the argument is specified as a quoted string.
I think it would be useful to be to access series attributes (labels) by passing an index value to the @attr() function instead of a quoted string.

For example, the @attr() function would be more flexible if I could also use it like this (conducive to looping):

Code: Select all

series_name.@attr(1) series_name.@attr(2) etc. series_name.@attr(max_attr)
It would also be useful to be able to get the maximum number of series attributes (labels).

The reason for this kind of flexibility is because I may not know the series labels to be able to pass in a quoted string.

An alternative solution would be to able to obtain a list of the series attributes (from which I could get the max number and then design a loop). Maybe this functionality already exists?

Thanks,
Graeme

Re: series attribute by number

Posted: Sun Nov 24, 2019 11:58 am
by EViews Gareth
There isn’t really an order to them, so numbers isn’t great.

A list of attributes is possible, but it would really be on a workfile basis, and then individual objects would have blanks if they didn’t have an entry for that attribute.

We could also do it on an object basis, I suppose.

Re: series attribute by number

Posted: Tue Nov 26, 2019 5:05 am
by xprimexinverse
Thanks for the reply, Gareth.

A list of attributes sounds like a good solution.

Cheers,
Graeme