all.equal.haploNet | R Documentation |
This function compares two haplotype networks and returns either
TRUE
or a description of the differences.
## S3 method for class 'haploNet'
all.equal(target, current, use.steps = TRUE, ...)
target , current |
two objects of class |
use.steps |
a logical value: whether to consider the number of steps (or length) in each link. |
... |
(unused). |
This function should return TRUE
if the two networks are
identical even if the links are ordered differently. In all other
situations, a vector of character strings describing the differences
is returned.
As usual with the all.equal
function, this cannot
be used directly to return a TRUE
/FALSE
value (see
examples).
either a logical value (TRUE
), or a vector of mode character.
Emmanuel Paradis
haploNet
, mst
data(woodmouse)
d <- dist.dna(woodmouse, "n")
nt1 <- mst(d)
nt2 <- msn(d)
(comp <- all.equal(nt1, nt2)) # clearly different
## how to use all.equal to return TRUE/FALSE:
isTRUE(comp) # FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.