[R] last observation carried forward +1

2011-09-30 Thread Jan Wijffels
Hi R-helpers I'm looking for a vectorised function which does missing value replacement as in last observation carried forward in the zoo package but instead of a locf, I would like the locf function to add +1 to each time a missing value occurred. See below for an example. require(zoo) x -

Re: [R] last observation carried forward +1

2011-09-30 Thread Gabor Grothendieck
On Fri, Sep 30, 2011 at 5:43 AM, Jan Wijffels jwijff...@bnosac.be wrote: Hi R-helpers I'm looking for a vectorised function which does missing value replacement as in last observation carried forward in the zoo package but instead of a locf, I would like the locf function to add +1 to each