Learn R Programming

phylosim (version 3.0.5)

setAlphabet.QMatrix: Set the Alphabet object for a QMatrix object

Description

Set the Alphabet object for a QMatrix object.

This method rebuilds the scaled and unscaled rate matrices and so sets all rates to NA.

Usage

# S3 method for QMatrix
setAlphabet(this, value, ...)

Arguments

this

A QMatrix object.

value

An Alphabet object.

...

Not used.

Value

The Alphabet object.

See Also

For more information see QMatrix.

Examples

Run this code
# NOT RUN {
	# create a QMatrix object
	m<-QMatrix()
	# set the alphabet
	setAlphabet(m,NucleotideAlphabet())
	# get the alphabet
	getAlphabet(m)
	# set alphabet via virtual field
	m$alphabet<-BinaryAlphabet()
	summary(m)
 
# }

Run the code above in your browser using DataLab