setAncestral.Sequence: Set the ancestral object of a Sequence object

Description Usage Arguments Value Author(s) See Also Examples

Description

Set the ancestral object of a Sequence object.

Usage

1
2
## S3 method for class 'Sequence'
setAncestral(this, value, ...)

Arguments

this

A Sequence object.

value

A Sequence or a Process object.

...

Not used.

Value

The new ancestral object (invisible).

Author(s)

Botond Sipos, Gregory Jordan

See Also

For more information see Sequence.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
	# create a nucleotide sequence and a process object
	s<-NucleotideSequence(string="AGCT")
	p<-Process(name="MyProcess")
	# set the p as the ancestral of s
	setAncestral(s,p)
	s$ancestral
	# clone s
	cs<-clone(s)
	# set cs as ancestral of s via virtual field
	s$ancestral<-cs
	# get ancestral ids
	s$ancestral$id
	cs$ancestral$id
 

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