setQMatrix.GeneralSubstitution: Set the QMatrix object aggregated by a GeneralSubstitution...

Description Usage Arguments Value Author(s) See Also Examples

Description

Set the QMatrix object aggregated by a GeneralSubstitution object.

This method is mostly used internally.

Usage

1
2
## S3 method for class 'GeneralSubstitution'
setQMatrix(this, value, ...)

Arguments

this

A GeneralSubstitution object.

value

A QMatrix object.

...

Not used.

Value

The QMatrix object.

Author(s)

Botond Sipos, Gregory Jordan

See Also

For more information see GeneralSubstitution.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
	# create a GeneralSubstitution object
	# provide an Alphabet object and the rates
	p<-GeneralSubstitution(alphabet=BinaryAlphabet(), rate.list=list("1->0"=1,"0->1"=1))
	# get the QMatrix object
	getQMatrix(p)
	# get the QMatrix object via virtual field
	q<-p$qMatrix
	# tweak with the QMatrix
	setRate(q,"0->1",2)
	# set a new QMatrix for p
	setQMatrix(p,q)
	summary(p)
	# set new QMatrix via virtual field
	setRate(q,"1->0",2)
	p$qMatrix<-q
	summary(p)
 

phylosim documentation built on Nov. 22, 2019, 1:07 a.m.