[R] If equal statement for character objects

cm bunnylover23 at optonline.net
Mon Jul 30 16:32:44 CEST 2012

I have a data frame (trans)
123     P
143     z   ...ect

I want to write a statement that says:
if ((trans[i,2]="p")&(trans[1+1,2]="z")){....

but I get the warning message that states:
 operations are possible only for numeric, logical or complex types

Any ideas?

View this message in context: http://r.789695.n4.nabble.com/If-equal-statement-for-character-objects-tp4638359.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list