na.locf remove leading NAs, keep others
<p>I have a question regarding the <code>na.locf</code> function in the <code>zoo</code> package. Within the data frame below I want to remove the leading NAs (for years 1987, 1988) but keep those with a valid value for the previous year (1993). </p>

<pre><code>Year     X
1987     NA
1988     NA
1989     2
1990     5
1991     9
1992     16
1993     NA
1994     27
1995     36
</code></pre>

<p>Does anyone have a solution for this problem?</p>