| rDNAbin {ape} | R Documentation |
Random DNA Sequences
Description
This function generates random sets of DNA sequences.
Usage
rDNAbin(n, nrow, ncol, base.freq = rep(0.25, 4), prefix = "Ind_")
Arguments
n |
a vector of integers giving the lengths of the sequences. Can
be missing in which case |
nrow, ncol |
two single integer values giving the number of
sequences and the number of sites, respectively (ignored if |
base.freq |
the base frequencies. |
prefix |
the prefix used to give labels to the sequences; by default these are Ind_1, ... Ind_n (or Ind_nrow). |
Details
If n is used, this function generates a list with sequence lengths given by the values in n. If n is missing, a matrix is
generated.
The purpose of this function is to generate a set of sequences of a
specific size. To simulate sequences on a phylogenetic tree, see
simSeq in phangorn (very efficient), and
the package phylosim (more for pedagogy).
Value
an object of class "DNAbin".
Note
It is not recommended to use this function to generate objects larger than two billion bases (2 Gb).
Author(s)
Emmanuel Paradis
See Also
Examples
rDNAbin(1:10)
rDNAbin(rep(10, 10))
rDNAbin(nrow = 10, ncol = 10)