[R] replace values but different replacement length
Christian Schulz
ozric at web.de
Fri Jul 2 17:03:44 CEST 2004
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
More information about the R-help
mailing list