Learn R Programming

phylosim (version 3.0.5)

setPhylo.PhyloSim: Set the phylo object for a PhyloSim object

Description

Set the phylo object for a PhyloSim object.

The internal structure of the provided phylo object is reordered in a cladeweise fashion.

Usage

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

Arguments

this

A PhyloSim object.

value

A phylo object created by the ape package.

...

Not used.

Value

A phylo object or FALSE.

See Also

The PhyloSim class, the ape package.

Examples

Run this code
# NOT RUN {
	#create a PhyloSim object
	sim<-PhyloSim();
	# creat a phylo object
	tree<-rcoal(3);
	# get/set phylo object
	setPhylo(sim,tree);
	getPhylo(sim,tree);
	# get/set phylo object via virtual field
	sim$tree<-rcoal(5);
	sim$tree;
 
# }

Run the code above in your browser using DataLab