MinimumLength | R Documentation |
The smallest length that a character can obtain on any tree.
MinimumLength(x, compress = FALSE)
## S3 method for class 'phyDat'
MinimumLength(x, compress = FALSE)
## S3 method for class 'numeric'
MinimumLength(x, compress = NA)
## S3 method for class 'character'
MinimumLength(x, compress = TRUE)
MinimumSteps(x)
x |
An object of class Inapplicable tokens should be denoted with the integer |
compress |
Logical specifying whether to retain the compression of a
|
MinimumLength()
returns a vector of integers specifying the
minimum number of steps that each character must contain.
Martin R. Smith (martin.smith@durham.ac.uk)
Other tree scoring:
CharacterLength()
,
IWScore()
,
LengthAdded()
,
MorphyTreeLength()
,
TaxonInfluence()
data("inapplicable.datasets")
myPhyDat <- inapplicable.phyData[[4]]
# load your own data with
# my.PhyDat <- as.phyDat(read.nexus.data("filepath"))
# or Windows users can select a file interactively using:
# my.PhyDat <- as.phyDat(read.nexus.data(choose.files()))
class(myPhyDat) # phyDat object
# Minimum length of each character in turn
MinimumLength(myPhyDat)
# Collapse duplicate characters, per phyDat compression
MinimumLength(myPhyDat, compress = TRUE)
# Calculate length of a single character from its textual representation
MinimumLength("-{-1}{-2}{-3}2233")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.