Description Usage Arguments Value Author(s) See Also Examples
Generate the list of active Event objects for a given attached Site object.
This is the single most important method in the GeneralSubstitution
class. It generates a list of the active
Event objects given the transition rate matrix (Q matrix) and the "rate.multiplier" Site-Process specific parameter.
It returns an empty list if the state of the site is "NA".
1 2 | ## S3 method for class 'GeneralSubstitution'
getEventsAtSite(this, target.site, ...)
|
this |
A GeneralSubstitution object. |
target.site |
A Site object. The GeneralSubstitution object must be attached to the Site object. |
... |
Not used. |
A list of the active Event objects.
Botond Sipos, Gregory Jordan
For more information see GeneralSubstitution
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # create an Alphabet object
a<-BinaryAlphabet()
# create a Site object
s<-Site(alphabet=a);
# create a GeneralSubstitution object
p<-GeneralSubstitution(alphabet=a,rate.list=list("0->1"=1,"1->0"=1))
# attach process p to site object s
attachProcess(s,p)
# get the rate of active events
getEventsAtSite(p,s) # empty list
# set the state of s
s$state<-1;
# get the rate of active events
getEventsAtSite(p,s)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.