Calculate a statistic for each locus by group An internal function essentially to convey readability to rather contorted R code. It takes as input a genlight {adegenet} object with an index variable (say, population) and calculates the selected statistic for each locus, broken down by the groups defined by the index variable.
Calculate a statistic for each locus by group
An internal function essentially to convey readability to rather contorted R code. It takes as input a genlight {adegenet} object with an index variable (say, population) and calculates the selected statistic for each locus, broken down by the groups defined by the index variable.
gl.gene.freq(gl, method = pop(gl), stat = "mean")
gl |
– name of the genlight object containing the SNP data [required] |
method |
– breakdown variable [default pop(x)] |
stat |
– statistic to calculate: mean [only mean(x)/2 currently implemented] |
A matrix, populations (rows) by loci (columns), showing the statistic [mean/2]
Arthur Georges (Post to https://groups.google.com/d/forum/dartr)
#result <- gl.gene.freq(testset.gl, method=pop(gl), stat="mean")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.