Learn R Programming

haplotypes (version 1.1.3.1)

subs-methods: Displays base substitutions

Description

This function displays all base substitutions. If fifth=="TRUE", each gap is treated as a fifth state character.

Usage

# S4 method for Dna
subs(x,fifth=FALSE)

Value

a list with three components:

subsmat:

a sequence matrix showing substitutions.

subs:

a list of matrices of the substitutions.

subsmnum:

total number of substitutions.

Arguments

x

an object of class Dna.

fifth

boolean; should gaps be treated as a fifth state character?

Methods

signature(x = "Dna")

Author

Caner Aktas, caktas.aca@gmail.com.

Examples

Run this code
data("dna.obj")
x<-dna.obj

## Base substitutions.
subs(x)

## Gaps are treated as a fifth state character.
subs(x,fifth=TRUE)

Run the code above in your browser using DataLab