On Tue, 16 Feb 2010, Ignacio Diaz-Emparanza wrote:
El lun, 15-02-2010 a las 16:40 -0500, Allin Cottrell escribió:
> OK, I think I have a solution. As you suggested originally, we'll
> make "obs" consistent, such that it always gives a series
> containing the 1-based index of the observations, regardless of
> the periodicity of the data.
>
OK.
> This means that, e.g., "(obs==1970)" will not work to pick out the
> observation for 1970 in an annual time series. But if you want to
> do that you can use the function obsnum(), as in
>
> series d70 = (obs==obsnum(1970))? 1 : 0
>
> (I had forgotten about obsnum, but it's clearly the tool for the
> job here.)
This will do the things much more clear for the user, I think.
But it is another backward incompatible change, so please remember, if
possible, to put a warning for the case of someone uses the old format,
and update the manual. Thank you.
The manual is now updated, but it's not possible to issue a
warning, I'm afraid. When the user types, e.g., "1980" after "=="
in a genr expression, we don't know what he/she intends to compare
it against, and whether the comparison make sense.
Allin.