clone.GeneralSubstitution: Clone a GeneralSubstitution object

Description Usage Arguments Value Author(s) See Also Examples

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

1
2
## S3 method for class 'GeneralSubstitution'
clone(this, ...)

Arguments

this

A GeneralSubstitution object.

...

Not used.

Value

A GeneralSubstitution object.

Author(s)

Botond Sipos, Gregory Jordan

See Also

For more information see GeneralSubstitution.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
	# 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)
 

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