Hi David,

Thanks for replying. Unfortunately I can't get it to work. Here is some
(very simplified) data to help illustrate my problem.

ind <- c('1','2','3','4')
fam <- c('1','2','1','2')
data <- data.frame(ind,fam)

ind is the unique ID for each individual, and fam is which family the
individual came from. Using combn(ind, 2) matches all of the individuals. Is
there any way I could get combn to pair individuals up based on a different
family number, so with the above data individual 1 would be paired with
individual 2 or 4. 

Many thanks,

Ben



--
View this message in context: 
http://r.789695.n4.nabble.com/pairing-data-using-combn-with-criteria-tp4649750p4649869.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.

Reply via email to