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

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

On Sun, Apr 6, 2008 at 9:04 AM, saikat sarkar <dipa_sanyal_at_yahoo.com> 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.



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html 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 https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive