Learn R Programming

phylosim (version 3.0.5)

getUniqueAlphabets.Sequence: Get the list of unique Alphabet objects associated to Site objects aggaregated by a Sequence object

Description

Get the list of unique Alphabet objects associated to Site objects aggaregated by a Sequence object. The returned list contains unique instances of the Alphabet class. The symbol sets are not compared, so two instances of the same class are considered to be different.

Usage

# S3 method for Sequence
getUniqueAlphabets(this, ...)

Arguments

this

A Sequence object.

...

Not used.

Value

A list of Alphabet objects.

See Also

For more information see Sequence.

Examples

Run this code
# NOT RUN {
	# create a Sequence object with some Alphabet objects attached
	s<-Sequence(
               alphabets=list(NucleotideAlphabet(),
               BinaryAlphabet(),
               NucleotideAlphabet()),
               length=10
               )
	# get the list of attached alphabets
	s$alphabets
	# get the unique list of attahced Alphabet objects
	getUniqueAlphabets(s)
 
# }

Run the code above in your browser using DataLab