hapreord-methods {haplotypes}R Documentation

Reorders haplotypes according to the ordering factor

Description

Reorders haplotypes according to the ordering factor.

Usage

## S4 method for signature 'Haplotype'
hapreord(x,order=c(1:x@nhap))

Arguments

x

an object of class Haplotype.

order

a vector giving the order of haplotypes, with one element per haplotype.

Value

returns an object of class Haplotype.

Methods

signature(x = "Haplotype")

Reorders haplotypes.

Author(s)

Caner Aktas, caktas.aca@gmail.com

See Also

haplotype

Examples

data("dna.obj")
x<-dna.obj[1:6,,as.matrix=FALSE]
# inferring haplotypes from DNA sequences
h<-haplotype(x)

## Reordering haplotypes.

# length of the argument 'order' is equal to the number of haplotypes
rh<-hapreord(h,order=c(4,3,1,2))
rh


[Package haplotypes version 1.1.3.1 Index]