Learn R Programming

phylosim (version 3.0.5)

Scale.QMatrix: Scale the scaled rate matrix stored in a QMatrix object by the provided factor

Description

Scale the scaled rate matrix stored in a QMatrix object by the provided factor.

This methods sets the scaled rate matrix to unscaled_matrix * constant.

Usage

# S3 method for QMatrix
Scale(this, constant=NA, ...)

Arguments

this

A QMatrix object.

constant

The scaling factor (a numeric vector of length one).

...

Not used.

Value

The QMatrix object (invisible).

See Also

For more information see QMatrix.

Examples

Run this code
# NOT RUN {
	# create a QMatrix object
	# , provide Alphabet object and rates
	m<-QMatrix(name="Susie Q", alphabet=BinaryAlphabet(), rate.list=list("1->0"=2,"0->1"=3))
	# get object summary
	summary(m)
	# perform scaling
	Scale(m, 1/0.666)
	# get object summary
	summary(m)
 
# }

Run the code above in your browser using DataLab