H-W only gives you the expected frequency of AA, AB, and BB genotypes (i.e.
a 1x3 table):

minor <- runif(10000, 0.05, 0.25)
major <- 1-minor
AA <- minor^2
AB <- 2*minor*major
BB <- major^2
df <- cbind(AA, AB, BB)


-Aaron

On Tue, Jun 21, 2011 at 9:30 PM, Jim Silverton <jim.silverton@gmail.com>wrote:

> Hello all,
> I am interested in simulating 10,000  2 x 3 tables for SNPs data with the
> Hardy Weinberg formulation. Is there a quick way to do this? I am assuming
> that the minor allelle frequency is uniform in (0.05, 0.25).
>
> --
> Thanks,
> Jim.
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>

	[[alternative HTML version deleted]]

