Hi,
I realize this may not be the best place for R help but thought I'd give it a shot.
I am trying to calculate allelic richness of MHC genes. To be more precise, because MHC alleles can not be assigned to loci I need to calculate richness on a population level. In addition because I have different n's for each population I need to standardize my allele counting using resampling.
So far in R:
Bootstrap.pop1<-replicate(1000,sample(POP1,10,replace=T))
table(Boot1)
This sub-samples all of the alleles found in my population with a sampling effort of 10, 1000 times.
Table then tells me how many times each allele was samples.
However, I need to count the number of unique alleles sampled at each of the 1000 iterations, and then find the mean of these values.
Any tips would be greatly appreciated....
Thanks,
J
I realize this may not be the best place for R help but thought I'd give it a shot.
I am trying to calculate allelic richness of MHC genes. To be more precise, because MHC alleles can not be assigned to loci I need to calculate richness on a population level. In addition because I have different n's for each population I need to standardize my allele counting using resampling.
So far in R:
Bootstrap.pop1<-replicate(1000,sample(POP1,10,replace=T))
table(Boot1)
This sub-samples all of the alleles found in my population with a sampling effort of 10, 1000 times.
Table then tells me how many times each allele was samples.
However, I need to count the number of unique alleles sampled at each of the 1000 iterations, and then find the mean of these values.
Any tips would be greatly appreciated....
Thanks,
J
Comment