alleles: Returns the alleles in a 'locus' object

Description Usage Arguments Value Author(s) Examples

View source: R/alleles.R

Description

This function will provide the alleles within a locus object for either a single locus or for a vector of loci

Usage

1
2
3
4
5
6
7
alleles(x, all = TRUE)

## Default S3 method:
alleles(x, all = TRUE)

## S3 method for class 'locus'
alleles(x, all = TRUE)

Arguments

x

A locus object (single or vector)

all

A flag indicating that you want all alleles returned (default=TRUE) A FALSE flag here indicates that you only want the unique alleles returned (e.g., the ones present).

Value

A matrix of alleles. If x is a vector then the result will be represented by rows.

Names from passed vector

Either a matrix or vector of alleles depending upon what was passed to the function.

Author(s)

Rodney J. Dyer rjdyer@vcu.edu

Examples

1
2
locus <- c( locus(1:2), locus(c(1,1)), locus(c(2,2)), locus(2:3) )
alleles(locus)

MarianaLag/Mlag documentation built on Feb. 13, 2020, 12:30 a.m.