Learn R Programming

spider (version 1.5.1)

checkDNA: Check a DNA alignment for missing data

Description

This functions counts the number of bases in an alignment that are composed of missing data.

Usage

checkDNA(DNAbin, gapsAsMissing = TRUE)

Value

A numeric vector giving the number of missing bases in each sequence of the alignment.

Arguments

DNAbin

A DNA alignment of class `DNAbin'.

gapsAsMissing

Logical. Should gaps (coded as '-') be considered missing bases? Default of TRUE.

Author

Samuel Brown <s_d_j_brown@hotmail.com>

Details

This function considers bases coded as '?' and 'N' as missing data. By default, gaps (coded as '-') are also considered missing.

Examples

Run this code

data(anoteropsis)
checkDNA(anoteropsis)
checkDNA(anoteropsis, gapsAsMissing=FALSE)

Run the code above in your browser using DataLab