base.freq {ape}R Documentation

Base frequencies from DNA Sequences

Description

This function computes the relative frequencies (i.e. proportions) of the four DNA bases (adenine, cytosine, guanine, and thymidine) from a sample of sequences.

Usage

base.freq(x, freq = FALSE)

Arguments

x a vector, a matrix, or a list which contains the DNA sequences.
freq a logical specifying whether to return the proportions (the default) or the absolute frequencies (counts).

Details

The base frequencies are computed over all sequences in the sample. All missing or unknown sites are discarded from the computations.

Value

A numeric vector storing the relative frequencies with names c("a", "c", "g", "t").

Author(s)

Emmanuel Paradis Emmanuel.Paradis@mpl.ird.fr

See Also

GC.content, seg.sites, nuc.div, DNAbin


[Package ape version 2.4-1 Index]