alleles: Returns the alleles in a 'locus' object

View source: R/alleles.R

allelesR Documentation

Returns the alleles in a locus object

Description

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

Usage

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

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

dyerlab/gstudio documentation built on Feb. 2, 2024, 8:24 p.m.