alleleinit converts genetic data with diploid loci as generated
by alleleconvert into an object of class
alleleobject. print.alleleobject is a print method for such
objects.alleleinit(file = NULL, allelematrix=NULL,
rows.are.individuals = TRUE,
neighborhood = "none", distance = "alleledist", namode="variables",
nachar="-", distcount=FALSE)
## S3 method for class 'alleleobject':
print(x, ...)
"prabclus"
format, see details. Either file
or allelematrix needs to be specified."prabclus"-format as generated by
alleleconvert, see details. Either file
or allelematrix needs to be specofied.TRUE, rows are interpreted
as individuals and columns are interpreted as loci.numeric(0). If neighborhoo"alleledist" or "none". The distance measure
between individuals to compute by alleleinit."single", "individuals",
"variables" , or "none". Determines whether a
single probability for the entry to be missing is computed for a
single locus of an individual ("single"TRUE, during distance computation
individuals are counted on the screen.alleleobject.alleleinit produces
an object of class alleleobject (note that this is similar to
class prab; for example both can be used with
prabclust), which is a list with componentsNA.charmatrix the second row number corresponding to the
neighboring individuals is listed.n.individuals used for
compatibility with prabclust.amatrix added for compatibility with objects of class
prab.prab added for
compatibility with objects of class prab.prab added for
compatibility with objects of class prab.namode.amatrixTRUE if a neighborhood was submitted."prabclus" of
alleleconvert. Alleles are coded by a single character,
so diploid loci need to be pairs of characters without space between
the two alleles (e.g., "AC"). The input needs to be an
individuals*loci matrix or data frame (or a file that produces such
a data frame by read.table(file,stringsAsFactors=FALSE))alleleconvert, alleledist,
prabinit.# Only 50 observations are used in order to have a fast example.
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)
print(tai)Run the code above in your browser using DataLab