sampleState.GeneralSubstitution: Sample a state from the equlibrium distribution of a...

Description Usage Arguments Value Author(s) See Also Examples

Description

Sample a state from the equlibrium distribution of a GeneralSubstitution object.

Usage

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

Arguments

this

A GeneralSubstitution object.

...

Not used.

Value

A character vector of length one.

Author(s)

Botond Sipos, Gregory Jordan

See Also

For more information see GeneralSubstitution.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
	# 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
	# sample from equilibrium distribution
	sampleState(p)
 

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