[R] replace values but different replacement length

From: Christian Schulz <ozric_at_web.de>
Date: Sat 03 Jul 2004 - 01:03:44 EST


Hi,

have anybody a hint/help how it's possible replace i.e. the NA values from BL02DATE with non-Missing values from BLOCKED and vice versa.
Both variables are with an id in a 188.249 rows data.frame and my fr function didn't count the NA's.

Many thanks
Christian

>>fr(BL02DATE)

       Count Prcnt
1     140660  84.6 
2      25589  15.4 

Total 166249 100.0

>>fr(BLOCKED)

       Count Prcnt
1     151982  85.4 
2      25976  14.6 

Total 177958 100.0

>>match02$BL02DATE[is.na(match02$BL02DATE)] <- match02$BLOCKED
Warning message: number of items to replace is not a multiple of replacement length



R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Jul 03 01:07:07 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 09:16:43 EST