Re: [R] extracting parts of words or extraxting letter to use in ifelse-func.

2009-02-13 Thread Patrizio Frederic
hey Joe, I had a quick look at your code. In this line: b2$PRRSvac <- ifelse(b2$status=="MS-X, PRRS-pos"|b2$status=="R�d SPF+Myc+Ap2+DK+Vac",1,0) some special characters are used. You must use only plain ascii characters Hope this help. Cheers, Patrizio 2009/2/13 joe1985 : > > Hello > > I want

[R] extracting parts of words or extraxting letter to use in ifelse-func.

2009-02-13 Thread joe1985
Hello I want to make some variables with the ifelse-function, but i don't know how to do it. I want to make these five variables; b2$PRRSvac <- ifelse(b2$status=='A' | b2$status=='Aa',1,0) b2$PRRSdk <- ifelse(b2$status=='B' | b2$status=='Bb',1,0) b2$sanVac <- ifelse(b2$status=='C' | b2$sta