On 18-07-2011, at 22:00, Allin Cottrell wrote:
I'm thinking it might be good to revise the functions
firstobs() and lastobs() so they restrict their checks for
non-missing values to the current sample range (right now they
scan the entire dataset).
This would be backward incompatible, but I'd be surprised if
it would cause much trouble. Although it's so stated in the
manual, I think it's unintuitive for function writers that
firstobs() and lastobs() can give you observation indices that
are outside of the sample passed by the caller, and therefore
inaccessible.
Any support/objections?
I could imagine someone wanting to find out the first/last valid observation of a dataset
regardless of the current sample.
Suggestion:
firstsmplobs()
lastsmplobs()
which would do as proposed.
Berend