flagTotalRate.Site: Flag the total event rate

Description Usage Arguments Value Author(s) See Also Examples

Description

Flag the total event rate. This method sets the cached total active event rate to NA, which will trigger its recalculation when next accessed via getTotalRate.

Usage

1
2
## S3 method for class 'Site'
flagTotalRate(this, ...)

Arguments

this

A Site object.

...

Not used.

Value

Invisible NA.

Author(s)

Botond Sipos, Gregory Jordan

See Also

For more information see Site.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
	# create a site object:
	p<-K80(rate.params=list("Alpha"=2,"Beta"=0.5))
	s<-Site(alphabet=NucleotideAlphabet(), state="G", processes=list(p))
	# get site rate
	s$totalRate
	# modifying site object in a dangerous way (do not do this under any circumstances!)
	s$.processes = list()	# site object is now inconsistent!
	# get cached rate
	s$totalRate		# incorrect value
	# flag total rate
	flagTotalRate(s)
	# get site rate
	s$totalRate		# correct value

 

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