NA values in a subseries
Posted: Thu May 17, 2012 4:04 am
Hi everyone!
I'm trying to find the shortest code for the task below. I believe that I knew earlier how to do it in 1-2 lines but now I can't remember it.
Assume, we have a series X with yearly observations for the period from 1993 till 2007. We have a subperiod (say 2001-2005). How to check that all the elements of X for the subperiod are non-NA? Equivalently, how to check whether there is at least one NA value in X in this subperiod?
Thanks for all kinds of help!
I'm trying to find the shortest code for the task below. I believe that I knew earlier how to do it in 1-2 lines but now I can't remember it.
Assume, we have a series X with yearly observations for the period from 1993 till 2007. We have a subperiod (say 2001-2005). How to check that all the elements of X for the subperiod are non-NA? Equivalently, how to check whether there is at least one NA value in X in this subperiod?
Thanks for all kinds of help!