Re: [R] Check character string for value and assign corresponding value in a new variable

2010-04-23 Thread Hiro
That's perfect, thanks! -- View this message in context: http://r.789695.n4.nabble.com/Check-character-string-for-value-and-assign-corresponding-value-in-a-new-variable-tp2062391p2062818.html Sent from the R help mailing list archive at Nabble.com. __

[R] Check character string for value and assign corresponding value in a new variable

2010-04-23 Thread Hiro
= 10) 1. if test$v1 character string contains "PP" or "PA" set test$v2 value to "WIN". Alternatively, 2. if test$v1 character 3 and 4 equal "A" and M", set test$v2 to "LOSE". Please help! Hiro -- View this message in context: http://r.