Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

unbuild.charmatrix

Internal: create allele list out of character matrix


Description

Creates a list of lists, such as required by alleledist, from the charmatrix component of an alleleobject.

Usage

unbuild.charmatrix(charmatrix,n.individuals,n.variables)

Arguments

charmatrix

matrix of characters in which there are two rows for every individual corresponding to the two alleles in every locus (column). Entries are allele codes but missing values are coded as NA.

n.individuals

integer. Number of individuals.

n.variables

integer. Number of loci.

Value

A list of lists. In the "outer" list, there are n.variables lists, one for each locus. In the "inner" list, for every individual there is a vector of two codes (typically characters, see alleleinit) for the two alleles in that locus.

Author(s)

See Also

Examples

data(tetragonula)
  tnb <-
  coord2dist(coordmatrix=tetragonula.coord[1:50,],cut=50,file.format="decimal2",neighbors=TRUE)
  ta <- alleleconvert(strmatrix=tetragonula[1:50,])
  tai <- alleleinit(allelematrix=ta,neighborhood=tnb$nblist,distance="none")
  str(unbuild.charmatrix(tai$charmatrix,50,13))

prabclus

Functions for Clustering and Testing of Presence-Absence, Abundance and Multilocus Genetic Data

v2.3-2
GPL
Authors
Christian Hennig <christian.hennig@unibo.it>, Bernhard Hausdorf <Hausdorf@zoologie.uni-hamburg.de>
Initial release
2020-01-06

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.