Thankyou very much, I managed to count he numbr of Markers 2 linked to Markers 3. And Markers 1 to Markers 3 with the aggregate function:
with(data,aggregate(Marker1,list(Marker2=Marker2),length)) data2<-with(data,aggregate(Marker1,list(Marker2=Marker2,Marker3=Merker3),length)) So, now is easy I will only apply an "if" and solved. I want to thankyou Steve and David, the info you gave was actally usefull and I learned the "ave" now. I hope I can start being usefull in the R blog myself soon. Regards!!!! -- View this message in context: http://r.789695.n4.nabble.com/How-do-I-assign-boolean-o-1-values-to-a-column-tp3544304p3550309.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.