Learn R Programming

phylosim (version 3.0.5)

hasUndefinedRate.ToleranceSubstitution: Check if a ToleranceSubstitution object has undefined rates

Description

Check if a ToleranceSubstitution object has undefined rates.

Usage

# S3 method for ToleranceSubstitution
hasUndefinedRate(this, ...)

Arguments

this

A ToleranceSubstitution object.

...

Not used.

Value

TRUE or FALSE.

See Also

For more information see ToleranceSubstitution.

Examples

Run this code
# NOT RUN {
	# create a ToleranceSubstitution object
	p<-ToleranceSubstitution(alphabet=BinaryAlphabet())
	# check if it has undefined rates
	hasUndefinedRate(p)	# TRUE
	# set the missing rates
	p$rateList<-list("0->1"=1,"1->0"=2)
	# check for undefined rates again
	hasUndefinedRate(p)	# FALSE
 
# }

Run the code above in your browser using DataLab