Learn R Programming

phylosim (version 3.0.5)

setRootSeq.PhyloSim: Set the root sequence for a PhyloSim object

Description

Set the root sequence for a PhyloSim object.

The root sequence will be used as a starting point for the simulation. The phylo object must be set before trying to set the root sequence object.

Usage

# S3 method for PhyloSim
setRootSeq(this, value, ...)

Arguments

this

A PhyloSim object.

value

A valid Sequence object.

...

Not used.

Value

The root Sequence object if succesfull, FALSE otherwise.

See Also

For more information see PhyloSim. Sequence Process

Examples

Run this code
# NOT RUN {
	# create some objects
	sim<-PhyloSim(phylo=rcoal(3));
	seq<-NucleotideSequence(string="ATGCC");
	# set/get root sequence
	setRootSeq(sim, seq);
	getRootSeq(sim, seq);
	# set/get root sequence via virtual field
	sim$rootSeq<-BinarySequence(string="111000111000");
	sim$rootSeq;

 
# }

Run the code above in your browser using DataLab