[adegenet-forum] repooling random rows from genind objects
Spencer Bruce
goatsrunfaster at gmail.com
Thu Oct 23 16:29:10 CEST 2014
Hello All!
I have three seperate populations as genind objects. What I would like to
do is pull a certain number of random individuals from each, to form a new
single genind population.
I would then like individuals from this new genind population to mate
randomly, producing another genind object which would contain their
offspring.
Below is the code I came up with (which does not work):
Year1 <- repool(F1[sample(nrow(F1), 500), ], pop1[sample(nrow(pop1), 750),
], pop2[sample(nrow(pop2), 750), ], n=2000)
Year2 <- hybridize(Year1[sample(nrow(Year1), 1000), ],
Year1[sample(nrow(Year1), 1000), ], n=2000)
any help would be greatly appreciated!
Best,
Spencer
--
Spencer A Bruce
200 Washington St.
Troy, NY 12180
518 225 0787
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20141023/cb94a767/attachment.html>
More information about the adegenet-forum
mailing list