[R] Odp: conditional data replace (recode, change or whatsoever)

2011-08-03 Thread Petr PIKAL
Hi Hello, I have a big data.frame, a piece of it as follows. a b c d 1 58009 2010-11-02 0 NA 2 114761 NA 1 2008-11-05 3 184440 NA 1 2009-12-08 4 189372 NA 0 NA 5 105286

Re: [R] Odp: conditional data replace (recode, change or whatsoever)

2011-08-03 Thread zcatav
Petr Pikal wrote: Hi I believe there are better solutions but I would use two steps select rows where c==0 (see also FAQ 7.31) sel-which(big.data.frame$c==0) change NA values in b column based on sel big.data.frame$b[sel][is.na(big.data.frame$b[sel])]-20011-07-28 Beware of data