stephens999 / stat302

notes from my 302 class on Bayesian methods and principles of statistics
27 stars 46 forks source link

issue with R code #5

Closed anqi001 closed 10 years ago

anqi001 commented 10 years ago

Are the following lines meant to tabulate the counts on both alleles for each locus? compute_counts = function(data,locus){ return(table(data[,1+2_locus, 2+2_locus])) }

The code currently only tabulates the counts on the first allele only. I believe the code should actually be compute_counts = function(data,locus){ return(table(data[,1+2_locus]) + table(data[,2+2_locus])) }

stephens999 commented 10 years ago

yes, sorry you are correct. I've fixed the code now. Why did you close this issue?