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')
Run the code above in your browser using DataLab