if (FALSE) {
data("DataApes")
DataApes$PCstage->PCstage
DataApes$Tstage->Tstage
cc<- 2/parallel::detectCores()
RRphylo(tree=Tstage,y=PCstage,clus=cc)->RRstage
# Case 1. "evo.dir" without performing randomization
evo.dir(RRstage,angle.dimension="rates",pair.type="node",
node= 57,random="no")->ed1
# Case 1.1 angles and sizes of resultant vectors between individual species and the MRCA:
# for a focal node
retrieve.angles(ed1,wishlist="anglesMRCA",random="no",focus="node",
node=68)->ra1
# for a focal species
retrieve.angles(ed1,wishlist="anglesMRCA",random="no",focus="species",
species="Sap")->ra2
# for both focal node and species
retrieve.angles(ed1,wishlist="anglesMRCA",random="no",focus="both",
node=68,species="Sap")->ra3
# without any specific requirement
retrieve.angles(ed1,wishlist="anglesMRCA",random="no",focus="none")->ra4
# Case 1.2 angles and sizes of vectors between individual species
#and a fixed reference vector:
# for a focal node
retrieve.angles(ed1,wishlist="angleDir",random="no",focus="node",
node=68)->ra5
# for a focal species
retrieve.angles(ed1,wishlist="angleDir",random="no",focus="species",
species="Sap")->ra6
# for both focal node and species
retrieve.angles(ed1,wishlist="angleDir",random="no",focus="both",
node=68,species="Sap")->ra7
# without any specific requirement
retrieve.angles(ed1,wishlist="angleDir",random="no",focus="none")->ra8
# Case 1.3 angles between species resultant vectors:
# for a focal node
retrieve.angles(ed1,wishlist="angles.between.species",random="no",
focus="node", node=68)->ra9
# for a focal species
retrieve.angles(ed1,wishlist="angles.between.species",random="no",
focus="species", species="Sap")->ra10
# for both focal node and species
retrieve.angles(ed1,wishlist="angles.between.species",random="no",
focus="both",node=68,species="Sap")->ra11
# without any specific requirement
retrieve.angles(ed1,wishlist="angles.between.species",random="no",
focus="none")->ra12
# Case 2. "evo.dir" with performing randomization
evo.dir(RRstage,angle.dimension="rates",pair.type="node",node=57,
random="yes",nrep=10)->ed7
# Case 2.1 angles and sizes of resultant vectors between individual species and the MRCA:
# for a focal node
retrieve.angles(ed7,wishlist="anglesMRCA",random="yes",focus="node",
node=68)->ra13
# for a focal species
retrieve.angles(ed7,wishlist="anglesMRCA",random="yes", focus="species",
species="Sap")->ra14
# for both focal node and species
retrieve.angles(ed7,wishlist="anglesMRCA",random="yes",focus="both",
node=68,species="Sap")->ra15
# without any specific requirement
retrieve.angles(ed7,wishlist="anglesMRCA",random="yes",focus="none")->ra16
# Case 2.2 angles and sizes of vectors between individual species and a fixed reference vector:
# for a focal node
retrieve.angles(ed7,wishlist="angleDir",random="yes",focus="node",
node=68)->ra17
# for a focal species
retrieve.angles(ed7,wishlist="angleDir",random="yes",focus="species",
species="Sap")->ra18
# for both focal node and species
retrieve.angles(ed7,wishlist="angleDir",random="yes",focus="both",
node=68, species="Sap")->ra19
# without any specific requirement
retrieve.angles(ed7,wishlist="angleDir",random="yes",focus="none")->ra20
# Case 2.3 retrieve angles between species resultant vectors:
# for a focal node
retrieve.angles(ed7,wishlist="angles.between.species",random="yes",
focus="node", node=68)->ra21
# for a focal species
retrieve.angles(ed7,wishlist="angles.between.species",random="yes",
focus="species", species="Sap")->ra22
# for both focal node and species
retrieve.angles(ed7,wishlist="angles.between.species",random="yes",
focus="both",node=68,species="Sap")->ra23
# without any specific requirement
retrieve.angles(ed7,wishlist="angles.between.species",random="yes",
focus="none")->ra24
}
Run the code above in your browser using DataLab