Learn R Programming

phylosim (version 3.0.5)

clone.Sequence: Clone a Sequence object

Description

Clone a Sequence object.

The cloning of Sequence objects involves the cloning of all aggregated Site objects. Because of that the cloning of long sequences is quite expensive. The cloned Site objects have the orginal Site objects as ancestral. The new Sequence objects has the original object as ancestral.

Usage

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

Arguments

this

A Sequence object.

...

Not used.

Value

A Sequence object.

See Also

Sequence clone.Object

Examples

Run this code
# NOT RUN {
	# cretate a nucleotide sequence
	s<-NucleotideSequence(string="ATG")
	# clone the sequence
	cs<-clone(s)
	# get some properties
	equals(s,s)
	equals(s,cs)
	cs$ancestral
	cs$sites[[1]]$ancestral
 
# }

Run the code above in your browser using DataLab