Displaying 1 result from an estimated 1 matches for "sec99".
2005 Nov 27
5
creating a factor from other factors and ifelse
Hi,
Given
> sec98 <- factor(rep(1:2,3), labels=c("A", "B"))
> sec99 <- factor(rep(2:1,3), labels=c("A", "B"))
> sec99[c(2,5)] <- NA
> sec00 <- factor( c( rep(1,3), rep(2,3) ), labels=c("A", "B"))
> sec00[c(2,4)] <- NA
> sec1 <- ifelse(!is.na(sec99), sec99,
ifelse(!is.na(sec00), sec00,...