calc.theta {fsthet}R Documentation

This calculates theta.

Description

This calculates Weir (1990)'s theta. See the vignette for details on the calculation of beta.

Usage

calc.theta(df, i)

Arguments

df

A dataframe containing the genepop information, where the first column is the population ID.

i

Column number containing genotype information.

Value

ht

T2. This is a single numerical value.

fst

The calculated theta value (T1/T2) for this locus.

Examples

  gpop<-data.frame(popinfo=c(rep("POP 1", 20),rep("POP 2", 20)),ind.names=c(1:20,1:20),
    loc0=sample(c("0101","0102","0202"),40,replace=TRUE))
  theta1<-calc.theta(gpop, 3)
  ## Not run: 
    gfile<-system.file("extdata", "example.genepop.txt",package = 'fsthet')
    gpop<-my.read.gpop(gfile)
    theta1<-calc.theta(gpop,3) #calculate theta for the first SNP
  
## End(Not run)

[Package fsthet version 1.0.1 Index]