Displaying 1 result from an estimated 1 matches for "psought".
Did you mean:
sought
2010 Jul 20
1
ifelse() and missing values in test conditions
R experts,
I have been unable to get the following ifelse statement to work as desired when applied
to my data frame.
Example:
DF$ANYEF <- with(DF,ifelse(PSOUGHT1=='ANY'|PSOUGHT2=='ANY'|PSOUGHT3=='ANY',PEFF,0))
##### this statement will be replicated 16 times for 16 unique _EF variables ###
Basically, I want each ANYEF for each row to equal the corresponding row value for column
PEFF if 'ANY' occurs at least once among c...