| manipulate | R Documentation | 
These functions provide additional methods to manipulate objects of class
"DNAbin" and "AAbin" to supplement those available in the
ape package.
## S3 method for class 'DNAbin'
duplicated(x, incomparables = FALSE, pointers = TRUE, ...)
## S3 method for class 'DNAbin'
unique(x, incomparables = FALSE, attrs = TRUE, drop = FALSE, ...)
## S3 method for class 'DNAbin'
subset(x, subset, attrs = TRUE, drop = FALSE, ...)
## S3 method for class 'AAbin'
duplicated(x, incomparables = FALSE, pointers = TRUE, ...)
## S3 method for class 'AAbin'
unique(x, incomparables = FALSE, attrs = TRUE, drop = FALSE, ...)
## S3 method for class 'AAbin'
subset(x, subset, attrs = TRUE, drop = FALSE, ...)
| x | a  | 
| incomparables | placeholder, not currently functional. | 
| pointers | logical indicating whether the re-replication index key
should be returned as a  | 
| ... | further arguments to be passed between methods. | 
| attrs | logical indicating whether the attributes of the input object whose length match the object length (or number of rows if it is a matrix) should be retained and subsetted along with the object. This is useful if the input object has species, lineage and/or taxon ID metadata that need to be retained following the duplicate analysis. | 
| drop | logical; indicates whether the input matrix (assuming one is
passed) should be reduced to a vector if subset to a single sequence.
Defaults to FALSE in keeping with the style of the  | 
| subset | logical vector giving the elements or rows to be kept. | 
unique and subset return a
DNAbin or AAbin object. duplicated returns a logical vector.
Shaun Wilkinson
Paradis E, Claude J, Strimmer K, (2004) APE: analyses of phylogenetics and evolution in R language. Bioinformatics 20, 289-290.
Paradis E (2007) A bit-level coding scheme for nucleotides. https://emmanuelparadis.github.io/misc/BitLevelCodingScheme_20April2007.pdf.
Paradis E (2012) Analysis of Phylogenetics and Evolution with R (Second Edition). Springer, New York.
  data(whales)
  duplicates <- duplicated.DNAbin(whales, point = TRUE)
  attr(duplicates, "pointers")
  ## returned indices show that the last sequence is
  ## identical to the second one.
  ## subset the reference sequence database to only include unques
  whales <- subset.DNAbin(whales, subset = !duplicates)
  ## this gives the same result as
  unique.DNAbin(whales)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.