Description Usage Arguments Value Author(s) See Also Examples
Set the equilibrium distribution for a GeneralSubstitution 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.
1 2 | ## S3 method for class 'GeneralSubstitution'
setEquDist(this, value, force=FALSE, silent=FALSE, ...)
|
this |
A GeneralSubstitution 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. |
The new equlibrium distribution (invisible).
Botond Sipos, Gregory Jordan
For more information see GeneralSubstitution
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # 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 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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.