Learn R Programming

phylosim (version 3.0.5)

clone.ToleranceSubstitution: Clone a ToleranceSubstitution object

Description

Clone a ToleranceSubstitution object.

This method also clones the aggregated QMatrix object, but not the aggregated Alphabet object, as that is a good target for recycling.

Usage

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

Arguments

this

A ToleranceSubstitution object.

...

Not used.

Value

A ToleranceSubstitution object.

See Also

For more information see ToleranceSubstitution.

Examples

Run this code
# NOT RUN {
	# create a ToleranceSubstitution object
	p<-ToleranceSubstitution(
                           alphabet=BinaryAlphabet(),
                           rate.list=list("0->1"=1,"1->0"=2),
                           name="MyBinary"
                           )
	# clone p
	pp<-clone(p)
	# do some checks
	p;pp
	p == p
	p == pp
	equals(p$qMatrix, pp$qMatrix)
 
# }

Run the code above in your browser using DataLab