landscape.states {rmetasim}R Documentation

return a matrix containing actual genotypes for a particular locus

Description

return a matrix containing the states of the alleles in genotypes for a particular locus

Usage

  landscape.states(lnum=1,Rland)

Arguments

lnum the locus to return
Rland the Rmetasim landscape object

Details

Returns a matrix with rows = dim(rland$individuals)[1]. The first three columns correspond to the class (and two placeholder variables) of an individual. Here rland is a landscape object. The remaining columns (1 if haploid, 2 if diploid) contain the states of the alleles for the selected loci

Value

matrix

See Also

landscape.locus

Examples

  exampleland <- new.example.landscape()
  exampleland <- simulate.landscape(exampleland, 4)
  print("Allele frequencies at locus 1")
  table(landscape.locus(1,exampleland)[,c(-1,-2,-3)]) 
  rm(exampleland)

[Package rmetasim version 1.0.3 Index]