Learn R Programming

phylosim (version 3.0.5)

clone.GeneralSubstitution: Clone a GeneralSubstitution object

Description

Clone a GeneralSubstitution 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 GeneralSubstitution
clone(this, ...)

Arguments

this

A GeneralSubstitution object.

...

Not used.

Value

A GeneralSubstitution object.

See Also

For more information see GeneralSubstitution.

Examples

Run this code
# NOT RUN {
	# create a GeneralSubstitution object
	p<-GeneralSubstitution(
                           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