Learn R Programming

phylosim (version 3.0.5)

getAlphabet.ToleranceSubstitution: Get the Alphabet object aggregated by a ToleranceSubstitution object

Description

Get the Alphabet object aggregated by a ToleranceSubstitution object.

This method also sets the alphabet for the associated QMatrix object, which will set all rates to NA.

Usage

# S3 method for ToleranceSubstitution
getAlphabet(this, ...)

Arguments

this

A ToleranceSubstitution object.

...

Not used.

Value

An Alphabet object.

See Also

For more information see ToleranceSubstitution.

Examples

Run this code
# NOT RUN {
	# create a ToleranceSubstitution object with an attached BinaryAlphabet object
	p<-ToleranceSubstitution(alphabet=BinaryAlphabet())
	# get object summary
	summary(p)
	# get alphabet
	getAlphabet(p)
	# get alphabet via virtual field
	p$alphabet
	# set a new alphabet
	setAlphabet(p,NucleotideAlphabet())
	summary(p)
	# set alphabet via virtual field
	p$alphabet<-BinaryAlphabet()
	p$alphabet
 
# }

Run the code above in your browser using DataLab