Re: [R] how to manupute data frame with conditions fill cell with previous value if next cell is zero

From: Gabor Grothendieck <>
Date: Sun, 06 Apr 2008 12:08:00 -0400

On Sun, Apr 6, 2008 at 9:04 AM, saikat sarkar <> wrote:

> This is the 2nd time in the chat room. Its a great place to get help from R
> experts.

I assume you are referring to this email list. I am not aware of a chat room but if it exists that is something different from this list.

> I have a data frame problem, it contains thousands of data.

Actually you don't have a data frame problem. You have a time series problem and by representing it as a data frame instead of a time series you are running into one problem after another that would be trivially addressed with the correct representation.

See ?na.locf in the zoo package. mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Sun 06 Apr 2008 - 16:10:58 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 06 Apr 2008 - 18:30:26 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive