4 \title{Base frequencies from DNA Sequences}
6 \code{base.freq} computes the frequencies (absolute or relative) of
7 the four DNA bases (adenine, cytosine, guanine, and thymidine) from a
10 \code{Ftab} computes the contingency table with the absolute
11 frequencies of the DNA bases from a pair of sequences.
14 base.freq(x, freq = FALSE)
18 \item{x}{a vector, a matrix, or a list which contains the DNA
20 \item{y}{a vector with a single DNA sequence.}
21 \item{freq}{a logical specifying whether to return the proportions
22 (the default) or the absolute frequencies (counts).}
25 The base frequencies are computed over all sequences in the
26 sample. All missing or unknown sites are discarded from the
29 For \code{Ftab}, if the argument \code{y} is given then both \code{x}
30 and \code{y} are coerced as vectors and must be of equal length. If
31 \code{y} is not given, \code{x} must be a matrix or a list and only
32 the two first sequences are used.
35 A numeric vector with names \code{c("a", "c", "g", "t")}, or a four by
36 four matrix with similar dimnames.
38 \author{Emmanuel Paradis}
40 \code{\link{GC.content}}, \code{\link{seg.sites}},
41 \code{\link{nuc.div}}, \code{\link{DNAbin}}
46 base.freq(woodmouse, TRUE)
48 Ftab(woodmouse[1, ], woodmouse[2, ]) # same than above
49 Ftab(woodmouse[14:15, ]) # between the last two