Displaying 1 result from an estimated 1 matches for "rdad".
Did you mean:
rda
2010 May 16
2
sample
...offspring from the last
females. There must be a mistake in my script:
moms<-read.delim("females.txt", stringsAsFactors=FALSE,header=TRUE)
dads<-read.delim("males.txt", stringsAsFactors=FALSE,header=TRUE)
output_offspring<-data.frame()
for (i in 1:nrow(moms)){
rdad=sample(1:nrow(dads),1)
kid<-c(sample(moms[i,2:5],2),sample(dads[rdad,2:5],2))
output_offspring<-rbind(output_offspring,c(moms$SampleID[i],dads
$SampleID[rdad],kid))
}
write
.table
(output_offspring,"offspring_7.txt",row.names=T,col.names=T,quote=F)
females.txt:
SampleID A...