setEquDist.ToleranceSubstitution: Set the equilibrium distribution for a ToleranceSubstitution...

Description Usage Arguments Value Author(s) See Also Examples

Description

Set the equilibrium distribution for a ToleranceSubstitution object.

In the case the equlibrium distribution cannot be guessed from the rate matrix one should provide a valid equilibrium distribution. The equilibrium distribution must be compatible with the rate matrix. The provided numeric vector will be resacled in the case the sum of the elemnts is not one.

Usage

1
2
## S3 method for class 'ToleranceSubstitution'
setEquDist(this, value, force=FALSE, silent=FALSE, ...)

Arguments

this

A ToleranceSubstitution object.

value

A numeric vector containing the equlibrium symbol frequencies. The order of the frequencies must be the same as in the symbol vector of the attached Alphabet object.

force

Do not check compatibility with thr rate matrix.

silent

Do not print out warnings.

...

Not used.

Value

The new equlibrium distribution (invisible).

Author(s)

Botond Sipos, Gregory Jordan

See Also

For more information see ToleranceSubstitution.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
	# create a ToleranceSubstitution object
	# provide an Alphabet object and the rates
	p<-ToleranceSubstitution(
                           alphabet=BinaryAlphabet(),
                           rate.list=list("1->0"=1,"0->1"=1)
                           )
	# get equlibrium distribution
	getEquDist(p)
	# get equilibrium distribution via virtual field
	p$equDist
	# re-set the equilibrium distribution
	dist<-p$equDist * 3
	dist
	setEquDist(p,dist)
	p$equDist
	# re-set equilibrium distribution via virtual field
	p$equDist<-p$equDist * 2
	p$equDist
 

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